Method for accessing local network, and related device

ABSTRACT

Embodiments of the present application disclose a method for accessing a local network, and a related device, so that a user equipment can simultaneously access an operator network and a local network. The method in the embodiments of the present application includes: receiving, by an MME, an access request of user equipment UE that is sent by an base station eNB, where the access request carries access information of the UE; determining, according to the access information of the UE, a first local gateway corresponding to the UE; and establishing, for the UE, a user plane bearer that is from the eNB to a gateway C-GW of a core network and that includes the first local gateway used as an intermediate node.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/412,012, filed on May 14, 2019, which is continuation of U.S. patentapplication Ser. No. 15/923,905, filed on Mar. 16, 2018, now U.S. Pat.No. 10,299,309, which is a continuation of International PatentApplication No. PCT/CN2015/089982, filed on Sep. 18, 2015. All of theafore-mentioned patent applications are hereby incorporated by referencein their entireties.

TECHNICAL FIELD

Embodiments of the present application relate to the communicationsfield, and in particular, to a method for accessing a local network, anda related device.

BACKGROUND

In recent years, Long Term Evolution (LTE)/4G core network (EvolvedPacket Core, EPC) networks have become a main technology used in theglobal fourth generation mobile telecommunications because of highbandwidth and high service quality. Rapid popularization of intelligentterminals and mobile applications also brings rapid development of themobile Internet.

Bring your own device (BYOD) becomes a trend among enterprises.Currently, in a BYOD wireless office scenario in an enterprise, a localnetwork is still accessed mainly by using a local wireless router and byusing a Wireless Fidelity (Wi-Fi) technology.

However, after accessing the local network by using Wi-Fi, a userequipment cannot use an operator network (such as a 4G communicationsnetwork with high bandwidth and high service quality). If the operatornetwork needs to be used, the Wi-Fi connection needs to be firstdisconnected. Consequently, the user cannot access the local network.

SUMMARY

Embodiments of the present application provide a method for accessing alocal network, and a related device, so that a user equipment cansimultaneously access an operator network and a local network.

A first aspect of the embodiments of the present application provides amethod for accessing a local network, where the method includes:

receiving, by a mobility management entity MME, an access request ofuser equipment UE that is sent by a base station eNB, where the accessrequest carries access information of the UE;

determining, by the MME according to the access information of the UE, afirst local gateway corresponding to the UE, where the first localgateway is a gateway of a first local network; and

establishing, by the MME for the UE, a user plane bearer that is fromthe eNB to a gateway C-GW of a core network and that includes the firstlocal gateway used as an intermediate node.

The mobility management entity MME in the core network can determine,according to the access information of the user equipment UE that iscarried in the access request of the UE that is sent by the base stationeNB, the first local gateway corresponding to the UE, where the firstlocal gateway is the gateway of the first local network; and establish,for the UE, the user plane bearer that is from the eNB to the gatewayC-GW of the core network and that includes the first local gateway usedas the intermediate node. In this way, because the first local gatewayis used as the intermediate node in the user plane bearer, a dataconnection is established between the eNB and each of the gateway C-GWof the core network and the gateway of the first local network. The UEcan access not only an operator network but also the first local networkby using the eNB, so that a user equipment can simultaneously access theoperator network and the local network.

With reference to the first aspect of the embodiments of the presentapplication, in a first implementation of the first aspect of theembodiments of the present application, before the determining, by theMME according to the access information of the UE, a first local gatewaycorresponding to the UE, the method further includes:

obtaining, by the MME, function information of the eNB;

determining, by the MME according to the function information of theeNB, whether the eNB supports a local gateway connection; and

when determining that the eNB supports the local gateway connection,triggering, by the MME, the step of determining, by the MME according tothe access information of the UE, a first local gateway corresponding tothe UE.

A subsequent step is triggered only when it is determined, according tothe function information of the eNB, that the eNB supports the localgateway connection, so as to prevent a system from performing anunnecessary step, so that system operation efficiency is improved.

With reference to the first aspect or the first implementation of thefirst aspect of the embodiments of the present application, in a secondimplementation of the first aspect of the embodiments of the presentapplication, the access information includes the UE identifier, the UEidentifier is used to uniquely identify the UE, and the determining, bythe MME according to the access information of the UE, a first localgateway corresponding to the UE specifically includes:

searching, by the MME according to the UE identifier, a user managementserver for the first local gateway corresponding to the UE.

The user management server is searched, according to the UE identifier,for the first local gateway corresponding to the UE, so as to ensurethat the first local gateway is quickly and accurately found.

With reference to the second implementation of the first aspect of theembodiments of the present application, in a third implementation of thefirst aspect of the embodiments of the present application, the firstlocal gateway is a local gateway having a highest priority in multiplelocal gateways corresponding to the UE.

One UE may correspond to multiple local gateways having differentpriorities, so that adaptability of the solution to various scenarios isenhanced.

With reference to the first implementation of the first aspect of theembodiments of the present application, in a fourth implementation ofthe first aspect of the embodiments of the present application, thefunction information of the eNB further includes information about alocal gateway accessed by the eNB, the access information includes theUE identifier, and the UE identifier is used to uniquely identify theUE; and

the determining, by the MME according to the access information of theUE, a first local gateway corresponding to the UE specifically includes:

determining, by the MME according to the information about the localgateway accessed by the eNB and the UE identifier, the first localgateway corresponding to the UE.

The first local gateway corresponding to the UE can be determinedaccording to the UE identifier and the information about the localgateway accessed by the eNB, so as to better meet an actual userrequirement and improve man-machine interaction performance.

With reference to any one of the second implementation to the fourthimplementation of the first aspect of the embodiments of the presentapplication, in a fifth implementation of the first aspect of theembodiments of the present application, after the step of establishing,by the MME for the UE, a user plane bearer that is from the eNB to theC-GW and that includes the first local gateway used as an intermediatenode, the method further includes:

when the MME determines that a local gateway corresponding to the UE isupdated to a third local gateway, establishing, by the MME for the UE, auser plane bearer that is from the eNB to the C-GW and that includes thethird local gateway used as an intermediate node, where the third localgateway is a gateway of a third local network.

The user plane bearer can be automatically reestablished according to anupdate to the local network corresponding to the UE, so that userexperience is improved, and system intelligence is improved.

With reference to any one of the second implementation to the fourthimplementation of the first aspect of the embodiments of the presentapplication, in a sixth implementation of the first aspect of theembodiments of the present application, the method further includes:

obtaining, by the MME according to the UE identifier, a first subnetcorresponding to the UE, where the first subnet is located in the firstlocal network; and

sending, by the MME, a first routing instruction to the first localgateway, where the first routing instruction includes an identifier ofthe first subnet and the UE identifier, and the first routinginstruction is used to instruct to route, to the first subnet, data usedby the UE to access the first local network.

The subnet corresponding to the UE in the local network can bedetermined, and the routing instruction is sent to the local gateway, sothat the local gateway routes, to the subnet, all data used by the UE toaccess the local network, so as to implement precise control on networkaccess permission.

With reference to the sixth implementation of the first aspect of theembodiments of the present application, in a seventh implementation ofthe first aspect of the embodiments of the present application, theobtaining, by the MME according to the UE identifier, a first subnetcorresponding to the UE specifically includes:

determining, by the MME according to the UE identifier, a user groupcorresponding to the UE; and

determining, by the MME according to location information of the UEand/or a current time and the user group, the first subnet correspondingto the UE.

The user group corresponding to the UE can be first determined, and thenthe first subnet corresponding to the UE is determined according torelated information, so as to implement precise multi-control on networkaccess permission.

With reference to the sixth implementation or the seventh implementationof the first aspect of the embodiments of the present application, in aneighth implementation of the first aspect of the embodiments of thepresent application, after the step of establishing, by the MME for theUE, a user plane bearer that is from the eNB to a gateway C-GW of a corenetwork and that includes the first local gateway used as anintermediate node, the method further includes:

determining, by the MME, that a subnet corresponding to the UE isupdated to a third subnet;

determining, by the MME, that the third subnet is located in a secondlocal network, wherein the second local network is different from thefirst local network;

determining, by the MME, that a gateway of the second local network is asecond local gateway; and

establishing, by the MME for the UE, a user plane bearer that is fromthe eNB to the C-GW and that includes the second local gateway used asan intermediate node.

The user plane bearer can be automatically reestablished according to anupdate to the subnet corresponding to the UE, so that user experience isimproved, and system intelligence is improved.

With reference to the eighth implementation of the first aspect of theembodiments of the present application, in a ninth implementation of thefirst aspect of of the embodiments of the present application, after thestep of determining, by the MME, that a gateway of the second localnetwork is a second local gateway, the method further includes:

sending, by the MME, a third routing instruction to the second localgateway, where the third routing instruction includes an identifier ofthe third subnet and the UE identifier, and the routing instruction isused to instruct to route, to the third subnet, data used by the UE toaccess the second local network.

The data is automatically routed according to the reestablished userplane bearer, so that system intelligence is improved.

With reference to any one of the second implementation to the ninthimplementation of the first aspect of the embodiments of the presentapplication, in a tenth implementation of the first aspect of theembodiments of the present application, after the step of establishing,by the MME for the UE, a user plane bearer that is from the eNB to theC-GW and that includes the local gateway used as an intermediate node,the method further includes:

obtaining, by the MME according to the UE identifier, a network name ofthe subnet corresponding to the UE; and

sending, by the MME, the network name to the UE by using a non-accessstratum NAS message, so that the UE displays the network name on a userinterface.

The network name can be displayed on the user interface of the UE, so asto help the user more intuitively know a currently accessed subnet, andimprove man-machine interaction performance.

With reference to any one of the sixth implementation to the tenthimplementation of the first aspect of the embodiments of the presentapplication, in an eleventh implementation of the first aspect of theembodiments of the present application, the method further includes:

notifying, by the MME, the C-GW of the subnet currently corresponding tothe UE;

receiving, by the MME, a domain name system server address that isassigned to the subnet corresponding to the UE and that is returned bythe C-GW, where a domain name system server identified by the domainname system server address stores a correspondence between a domain nameand an IP address of a network device in the subnet corresponding to theUE; and

sending, by the MME to the UE, the domain name system server addressassigned to the subnet corresponding to the UE.

The domain name system server address is assigned to the subnetcorresponding to the UE, so that precise domain name resolution isimplemented.

With reference to any one of the first aspect to the eleventhimplementation of the first aspect of the embodiments of the presentapplication, in a twelfth implementation of the first aspect of theembodiments of the present application, the method further includes:

notifying, by the MME, the C-GW of a local network currentlycorresponding to the UE;

receiving, by the MME, a domain name system server address that isassigned to the local network corresponding to the UE and that isreturned by the C-GW, where a domain name system server identified bythe domain name system server address stores a correspondence between adomain name and an IP address of a network device in the local networkcorresponding to the UE; and

sending, by the MME to the UE, the domain name system server addressassigned to the local network corresponding to the UE.

The domain name system server address is assigned to the local networkcorresponding to the UE, so that precise domain name resolution isimplemented.

With reference to any one of the first aspect to the twelfthimplementation of the first aspect of the embodiments of the presentapplication, in a thirteenth implementation of the first aspect of theembodiments of the present application, the establishing, by the MME forthe UE, a user plane bearer that is from the eNB to a gateway C-GW of acore network and that includes the first local gateway used as anintermediate node specifically includes:

obtaining, by the MME, an IP address and an end point identifier of atunnel from the local gateway to the C-GW that are assigned by the C-GW,and sending, to the local gateway, the IP address and the end pointidentifier of the tunnel from the local gateway to the C-GW that areassigned by the C-GW;

obtaining, by the MME, an IP address and an end point identifier of atunnel from the local gateway to the eNB that are assigned by the eNB,and sending, to the local gateway, the IP address and the end pointidentifier of the tunnel from the local gateway to the eNB that areassigned by the eNB; and

obtaining, by the MME, an IP address and an end point identifier of atunnel from the C-GW to the local gateway that are assigned by the localgateway and an IP address and an end point identifier of a tunnel fromthe eNB to the local gateway that are assigned by the local gateway,sending, to the C-GW, the IP address and the end point identifier of thetunnel from the C-GW to the local gateway that are assigned by the localgateway, and sending, to the eNB, the IP address and the end pointidentifier of the tunnel from the eNB to the local gateway that areassigned by the local gateway.

The IP addresses and the end point identifiers of the tunnels areassigned to network elements, so as to ensure that the user plane bearerin which the local gateway is used as the intermediate node is smoothlyestablished, and ensure stability of the established user plane bearer.

A second aspect of the embodiments of the present application provides amethod for accessing a local network, where the method includes:

receiving, by a local gateway, a user plane establishment request sentby a mobility management entity MME, where the user plane establishmentrequest includes information about a user plane bearer that isestablished by a gateway C-GW of a core network for UE and that is fromthe local gateway to the C-GW, the UE accesses the core network by usingan eNB, and the local gateway is a local gateway corresponding to theUE; and

establishing, by the local gateway for the UE according to the userplane establishment request, a user plane bearer that is from the eNB tothe C-GW and that includes the local gateway used as an intermediatenode.

The local gateway can establish, for the UE, the user plane bearer inwhich the local gateway is used as the intermediate node, so that the UEaccesses an operator network and the local network in which the localgateway is used as a gateway.

With reference to the second aspect of the embodiments of the presentapplication, in a first implementation of the second aspect of theembodiments of the present application, the method further includes:

determining, by the local gateway, whether received data used by the UEto access a network is data used to access the local network; and

when determining that the data used by the UE to access a network is thedata used to access the local network, routing, by the local gateway tothe local network, the data used by the UE to access a network; or whendetermining that the data used by the UE to access a network is not thedata used to access the local network, forwarding, by the local gatewayto the C-GW, the data used by the UE to access a network.

Data is forwarded in different paths according to whether the data isthe data used to access the local network, so as to implement precisecontrol on network data access, and improve a data processing rate.

With reference to the first implementation of the second aspect of theembodiments of the present application, in a second implementation ofthe second aspect of the embodiments of the present application, afterthe step of establishing, by the local gateway for the UE according tothe user plane establishment request, a user plane bearer that is fromthe eNB to the C-GW and that includes the local gateway used as anintermediate node, and before the step of routing, by the local gatewayto the local network, the data used by the UE to access a network, themethod further includes:

determining, by the local gateway according to a UE identifier, a subnetcorresponding to the UE, where the UE identifier is used to uniquelyidentify the UE, the user plane establishment request includes the UEidentifier, and the step of routing, by the local gateway to the localnetwork, the data used by the UE to access a network includes: routing,by the local gateway to the subnet corresponding to the UE, the dataused by the UE to access a network.

After establishing, for the UE, the user plane bearer in which the localgateway is used as the intermediate node, the local gateway obtains thesubnet corresponding to the UE, and routes, to the subnet correspondingto the UE, the data used by the UE to access the local network, so as toimplement fine control on network access permission.

With reference to the first implementation of the second aspect of theembodiments of the present application, in a third implementation of thesecond aspect of the embodiments of the present application, after thestep of establishing, by the local gateway for the UE according to theuser plane establishment request, a user plane bearer that is from theeNB to the C-GW and that includes the local gateway used as anintermediate node, and before the step of routing, by the local gatewayto the local network, the data used by the UE to access a network, themethod further includes:

receiving, by the local gateway, a routing instruction sent by the MME,where the routing instruction includes a subnet identifier and a UEidentifier, the UE identifier is used to uniquely identify the UE, andthe subnet identifier is used to uniquely identify a subnet; and

the routing, by the local gateway to the local network, the data used bythe UE to access a network specifically includes:

routing, by the local gateway according to the routing instruction tothe subnet identified by the subnet identifier in the routinginstruction, the data used by the UE to access a network.

In the embodiments of the present application, the MME obtains thesubnet identifier corresponding to the UE, and the local gatewayreceives the routing instruction sent by the MME, and routes, accordingto the routing instruction to the subnet identified by the subnetidentifier, the data used by the UE to access the local network, so asto implement fine control on network access permission, and relieve dataprocessing pressure of the local gateway.

With reference to any one of the first implementation to the thirdimplementation of the second aspect of the embodiments of the presentapplication, in a fourth implementation of the second aspect of theembodiments of the present application, the determining, by the localgateway, whether received data used by the UE to access a network isdata used to access the local network specifically includes:

when the local gateway receives the data used by the UE to access anetwork, determining, by the local gateway according to a destination IPaddress of the data used by the UE to access a network, whether the dataused by the UE to access a network is the data used to access the localnetwork, where the local gateway stores a list of an IP address of anetwork device in the local network.

It is determined, according to the destination IP address of the dataused by the UE to access a network, whether the data is the data used toaccess the local network, so as to ensure accuracy of the determining.

With reference to any one of the second aspect to the fourthimplementation of the second aspect of the embodiments of the presentapplication, in a fifth implementation of the second aspect of theembodiments of the present application, the receiving, by a localgateway, a user plane establishment request sent by a mobilitymanagement entity MME specifically includes:

obtaining, by the local gateway, an IP address and an end pointidentifier of a tunnel from the local gateway to the C-GW that areassigned by the C-GW to a user plane of the UE; and

the establishing, by the local gateway for the UE according to the userplane establishment request, a user plane bearer that is from the eNB tothe C-GW and that includes the local gateway used as an intermediatenode specifically includes:

assigning, by the local gateway to the user plane of the UE, an IPaddress and an end point identifier of a tunnel from the C-GW to thelocal gateway and an IP address and an end point identifier of a tunnelfrom the eNB to the local gateway, and sending, to the MME, the IPaddress and the end point identifier of the tunnel from the C-GW to thelocal gateway that are assigned by the local gateway and the IP addressand the end point identifier of the tunnel from the eNB to the localgateway that are assigned by the local gateway.

The IP addresses and the end point identifiers of the tunnels areobtained and assigned, so as to ensure smooth establishment andstability of the user plane bearer.

A third aspect of the embodiments of the present application provides amethod for accessing a local network, where the method includes:

connecting, by an eNB, UE and a core network, where a gateway of thecore network is a C-GW;

establishing, by the eNB for the UE, a user plane bearer that is fromthe eNB to the C-GW and that includes a local gateway, corresponding tothe UE, used as an intermediate node, where the local gateway is agateway of a local network; and

when the eNB receives data used by the UE to access the local network,sending, by the eNB to the local gateway, the data used to access thelocal network.

After establishing, for the UE, the user plane bearer in which the localgateway is used as the intermediate node, the eNB can send, to the localgateway, the received data used by the UE to access the local network,so that an operator network and the local network are simultaneouslyaccessed.

With reference to the third aspect of the embodiments of the presentapplication, in a first implementation of the third aspect of theembodiments of the present application, before the step of establishing,by the eNB for the UE, a user plane bearer that is from the eNB to theC-GW and that includes a local gateway, corresponding to the UE, used asan intermediate node, the method further includes:

determining, by the eNB, the local gateway or a subnet corresponding tothe UE; and

notifying, by the eNB, an MME of the determined local gateway or subnetcorresponding to the UE.

The eNB determines the local gateway or the subnet corresponding to theUE and then notifies the MME, so as to relieve operation load of theMME.

With reference to the third aspect or the first implementation of thethird aspect of the embodiments of the present application, in a secondimplementation of the third aspect of the embodiments of the presentapplication, the establishing, by the eNB for the UE, a user planebearer that is from the eNB to the C-GW and that includes a localgateway, corresponding to the UE, used as an intermediate nodespecifically includes:

obtaining, by the eNB, an IP address and an end point identifier of atunnel from the eNB to the local gateway that are assigned by the localgateway to a user plane of the UE; and

assigning, by the eNB to the user plane of the UE, an IP address and anend point identifier of a tunnel from the local gateway to the eNB, andsending, to the MME, the IP address and the end point identifier of thetunnel from the local gateway to the eNB that are assigned by the eNB.

The IP addresses and the end point identifiers of the tunnels areobtained and assigned, so as to ensure smooth establishment andstability of the user plane bearer.

A fourth aspect of the embodiments of the present application providesan MME, including:

a first receiving module, configured to receive an access request ofuser equipment UE that is sent by a base station eNB, where the accessrequest carries access information of the UE; and

a first processing module, configured to: determine, according to theaccess information of the UE, a first local gateway corresponding to theUE, where the first local gateway is a gateway of a first local network;and establish, for the UE, a user plane bearer that is from the eNB to agateway C-GW of a core network and that includes the first local gatewayused as an intermediate node.

With reference to the fourth aspect of the embodiments of the presentapplication, in a first implementation of the fourth aspect of theembodiments of the present application, before determining, according tothe access information of the UE, the first local gateway correspondingto the UE, the first processing module is further configured to: obtainfunction information of the eNB; determine, according to the functioninformation of the eNB, whether the eNB supports a local gatewayconnection; and when determining that the eNB supports the local gatewayconnection, trigger the step of determining the first local gatewaycorresponding to the UE.

With reference to the fourth aspect or the first implementation of thefourth aspect of the embodiments of the present application, in a secondimplementation of the fourth aspect of the embodiments of the presentapplication, the access information includes the UE identifier, the UEidentifier is used to uniquely identify the UE, and when determining,according to the access information of the UE, the first local gatewaycorresponding to the UE, the first processing module is specificallyconfigured to search, according to the UE identifier, a user managementserver for the first local gateway corresponding to the UE.

With reference to the second implementation of the fourth aspect of theembodiments of the present application, in a third implementation of thefourth aspect of the embodiments of the present application, the firstlocal gateway is a local gateway having a highest priority in multiplelocal gateways corresponding to the UE.

With reference to the first implementation of the fourth aspect of theembodiments of the present application, in a fourth implementation ofthe fourth aspect of the embodiments of the present application, thefunction information of the eNB further includes information about alocal gateway accessed by the eNB, the access information includes theUE identifier, and the UE identifier is used to uniquely identify theUE; and when determining, according to the access information of the UE,the first local gateway corresponding to the UE, the first processingmodule is specifically configured to determine, according to theinformation about the local gateway accessed by the eNB and the UEidentifier, the first local gateway corresponding to the UE.

With reference to any one of the second implementation to the fourthimplementation of the fourth aspect of the embodiments of the presentapplication, in a fifth implementation of the fourth aspect of theembodiments of the present application, after the first processingmodule establishes, for the UE, the user plane bearer that is from theeNB to the C-GW and that includes the first local gateway used as theintermediate node, the first processing module is further configured to:when determining that a local gateway corresponding to the UE is updatedto a third local gateway, establish, for the UE, a user plane bearerthat is from the eNB to the C-GW and that includes the third localgateway used as an intermediate node, where the third local gateway is agateway of a third local network.

With reference to any one of the second implementation to the fourthimplementation of the fourth aspect of the embodiments of the presentapplication, in a sixth implementation of the fourth aspect of theembodiments of the present application, the first processing module isfurther configured to obtain, according to the UE identifier, a firstsubnet corresponding to the UE, where the first subnet is located in thefirst local network; and

the MME further includes:

a first sending module, configured to send a first routing instructionto the first local gateway, where the first routing instruction includesan identifier of the first subnet and the UE identifier, and the firstrouting instruction is used to instruct to route, to the first subnet,data used by the UE to access the first local network.

With reference to the sixth implementation of the fourth aspect of theembodiments of the present application, in a seventh implementation ofthe fourth aspect of the embodiments of the present application, whenobtaining, according to the UE identifier, the first subnetcorresponding to the UE, the first processing module is specificallyconfigured to: determine, according to the UE identifier, a user groupcorresponding to the UE; and determine, according to locationinformation of the UE and/or a current time and the user group, thefirst subnet corresponding to the UE.

With reference to the sixth implementation or the seventh implementationof the fourth aspect of the embodiments of the present application, inan eighth implementation of the fourth aspect of the embodiments of thepresent application, after the first processing module establishes, forthe UE, the user plane bearer that is from the eNB to the gateway C-GWof the core network and that includes the first local gateway used asthe intermediate node, the first processing module is further configuredto: determine that a subnet corresponding to the UE is updated to athird subnet; determine that the third subnet is located in a secondlocal network, wherein the second local network is different from thefirst local network; determine that a gateway of the second localnetwork is a second local gateway; and establish, for the UE, a userplane bearer that is from the eNB to the C-GW and that includes thesecond local gateway used as an intermediate node.

With reference to the eighth implementation of the fourth aspect of theembodiments of the present application, in a ninth implementation of thefourth aspect of the embodiments of the present application, after thefirst processing module determines that the gateway of the second localnetwork is the second local gateway, the first sending module is furtherconfigured to send a third routing instruction to the second localgateway, where the third routing instruction includes an identifier ofthe third subnet and the UE identifier, and the routing instruction isused to instruct to route, to the third subnet, data used by the UE toaccess the second local network.

With reference to any one of the second implementation to the ninthimplementation of the fourth aspect of the embodiments of the presentapplication, in a tenth implementation of the fourth aspect of theembodiments of the present application, after establishing, for the UE,the user plane bearer that is from the eNB to the C-GW and that includesthe local gateway used as the intermediate node, the first processingmodule is further configured to: obtain, according to the UE identifier,a network name of the subnet corresponding to the UE; and send thenetwork name to the UE by using a non-access stratum NAS message, sothat the UE displays the network name on a user interface.

With reference to any one of the sixth implementation to the tenthimplementation of the fourth aspect of the embodiments of the presentapplication, in an eleventh implementation of the fourth aspect of theembodiments of the present application, the first sending module isfurther configured to notify the C-GW of the subnet currentlycorresponding to the UE;

the first receiving module is further configured to receive a domainname system server address that is assigned to the subnet correspondingto the UE and that is returned by the C-GW, where a domain name systemserver identified by the domain name system server address stores acorrespondence between a domain name and an IP address of a networkdevice in the subnet corresponding to the UE; and

the first sending module is further configured to send, to the UE, thedomain name system server address assigned to the subnet correspondingto the UE.

With reference to any one of the fourth aspect to the eleventhimplementation of the fourth aspect of the embodiments of the presentapplication, in a twelfth implementation of the fourth aspect of theembodiments of the present application, the first sending module isfurther configured to notify the C-GW of a local network currentlycorresponding to the UE;

the first receiving module is further configured to receive a domainname system server address that is assigned to the local networkcorresponding to the UE and that is returned by the C-GW, where a domainname system server identified by the domain name system server addressstores a correspondence between a domain name and an IP address of anetwork device in the local network corresponding to the UE; and

the first sending module is further configured to send, to the UE, thedomain name system server address assigned to the local networkcorresponding to the UE.

With reference to any one of the fourth aspect to the twelfthimplementation of the fourth aspect of the embodiments of the presentapplication, in a thirteenth implementation of the fourth aspect of theembodiments of the present application, when establishing, for the UE,the user plane bearer that is from the eNB to the gateway C-GW of thecore network and that includes the first local gateway used as theintermediate node, the first processing module is specificallyconfigured to: control the first receiving module to obtain an IPaddress and an end point identifier of a tunnel from the local gatewayto the C-GW that are assigned by the C-GW, and control the first sendingmodule to send, to the local gateway, the IP address and the end pointidentifier of the tunnel from the local gateway to the C-GW that areassigned by the C-GW; control the first receiving module to obtain an IPaddress and an end point identifier of a tunnel from the local gatewayto the eNB that are assigned by the eNB, and control the first sendingmodule to send, to the local gateway, the IP address and the end pointidentifier of the tunnel from the local gateway to the eNB that areassigned by the eNB; and control the first receiving module to obtain anIP address and an end point identifier of a tunnel from the C-GW to thelocal gateway that are assigned by the local gateway and an IP addressand an end point identifier of a tunnel from the eNB to the localgateway that are assigned by the local gateway, and control the firstsending module to send, to the C-GW, the IP address and the end pointidentifier of the tunnel from the C-GW to the local gateway that areassigned by the local gateway, and to send, to the eNB, the IP addressand the end point identifier of the tunnel from the eNB to the localgateway that are assigned by the local gateway.

A fifth aspect of the embodiments of the present application provides alocal gateway, including:

a second receiving module, configured to receive a user planeestablishment request sent by a mobility management entity MME, wherethe user plane establishment request includes information about a userplane bearer that is established by a gateway C-GW of a core network forUE and that is from the local gateway to the C-GW, the UE accesses thecore network by using an eNB, and the local gateway is a local gatewaycorresponding to the UE; and

a second processing module, configured to establish, for the UEaccording to the user plane establishment request, a user plane bearerthat is from the eNB to the C-GW and that includes the local gatewayused as an intermediate node.

With reference to the fifth aspect of the embodiments of the presentapplication, in a first implementation of the fifth aspect of theembodiments of the present application, the second processing module isfurther configured to determine whether received data used by the UE toaccess a network is data used to access the local network; and

the local gateway further includes:

a second sending module, configured to: when it is determined that thedata used by the UE to access a network is the data used to access thelocal network, route, to the local network, the data used by the UE toaccess a network; or when it is determined that the data used by the UEto access a network is not the data used to access the local network,forward, to the C-GW, the data used by the UE to access a network.

With reference to the first implementation of the fifth aspect of theembodiments of the present application, in a second implementation ofthe fifth aspect of the embodiments of the present application, afterthe second processing module establishes, for the UE according to theuser plane establishment request, the user plane bearer that is from theeNB to the C-GW and that includes the local gateway used as theintermediate node, and before the second sending module routes, to thelocal network, the data used by the UE to access a network, the secondprocessing module is further configured to determine, according to a UEidentifier, a subnet corresponding to the UE, where the UE identifier isused to uniquely identify the UE, and the user plane establishmentrequest includes the UE identifier; and

when routing, to the local network, the data used by the UE to access anetwork, the second sending module is specifically configured to route,to the subnet corresponding to the UE, the data used by the UE to accessa network.

With reference to the first implementation of the fifth aspect of theembodiments of the present application, in a third implementation of thefifth aspect of the embodiments of the present application, after thesecond processing module establishes, for the UE according to the userplane establishment request, the user plane bearer that is from the eNBto the C-GW and that includes the local gateway used as the intermediatenode, and before the second sending module routes, to the local network,the data used by the UE to access a network, the second receiving moduleis further configured to receive a routing instruction sent by the MME,where the routing instruction includes a subnet identifier and a UEidentifier, the UE identifier is used to uniquely identify the UE, andthe subnet identifier is used to uniquely identify a subnet; and

when routing, to the local network, the data used by the UE to access anetwork, the second sending module is specifically configured to route,according to the routing instruction to the subnet identified by thesubnet identifier in the routing instruction, the data used by the UE toaccess a network.

With reference to any one of the first implementation to the thirdimplementation of the fifth aspect of the embodiments of the presentapplication, in a fourth implementation of the fifth aspect of theembodiments of the present application, when determining whether thereceived data used by the UE to access a network is the data used toaccess the local network, the second processing module is specificallyconfigured to: when the data used by the UE to access a network isreceived, determine, according to a destination IP address of the dataused by the UE to access a network, whether the data used by the UE toaccess a network is the data used to access the local network, where thelocal gateway stores a list of an IP address of a network device in thelocal network.

With reference to any one of the fifth aspect to the fourthimplementation of the fifth aspect of the embodiments of the presentapplication, in a fifth implementation of the fifth aspect of theembodiments of the present application, when receiving the user planeestablishment request sent by the mobility management entity MME, thesecond receiving module is specifically configured to obtain an IPaddress and an end point identifier of a tunnel from the local gatewayto the C-GW that are assigned by the C-GW to a user plane of the UE; and

when establishing, for the UE according to the user plane establishmentrequest, the user plane bearer that is from the eNB to the C-GW and thatincludes the local gateway used as the intermediate node, the secondprocessing module is specifically configured to: assign, to the userplane of the UE, an IP address and an end point identifier of a tunnelfrom the C-GW to the local gateway and an IP address and an end pointidentifier of a tunnel from the eNB to the local gateway; and controlthe second sending module to send, to the MME, the IP address and theend point identifier of the tunnel from the C-GW to the local gatewaythat are assigned by the second processing module and the IP address andthe end point identifier of the tunnel from the eNB to the local gatewaythat are assigned by the second processing module.

A sixth aspect of the embodiments of the present application provides anbase station eNB, including:

a third processing module, configured to: connect UE and a core network,where a gateway of the core network is a C-GW; and establish, for theUE, a user plane bearer that is from the eNB to the C-GW and thatincludes a local gateway, corresponding to the UE, used as anintermediate node, where the local gateway is a gateway of a localnetwork;

a third receiving module, configured to receive data used by the UE toaccess the local network; and

a third sending module, configured to: when the data used by the UE toaccess the local network is received, send, to the local gateway, thedata used to access the local network.

With reference to the sixth aspect of the embodiments of the presentapplication, in a first implementation of the sixth aspect of theembodiments of the present application, before establishing, for the UE,the user plane bearer that is from the eNB to the C-GW and that includesthe local gateway, corresponding to the UE, used as the intermediatenode, the third processing module is further configured to determine thelocal gateway or a subnet corresponding to the UE; and

the third sending module is further configured to notify an MME of thedetermined local gateway or subnet corresponding to the UE.

With reference to the sixth aspect or the first implementation of thesixth aspect of the embodiments of the present application, in a secondimplementation of the sixth aspect of the embodiments of the presentapplication, when establishing, for the UE, the user plane bearer thatis from the eNB to the C-GW and that includes the local gateway,corresponding to the UE, used as the intermediate node, the thirdprocessing module is specifically configured to: control the thirdreceiving module to obtain an IP address and an end point identifier ofa tunnel from the eNB to the local gateway that are assigned by thelocal gateway to a user plane of the UE; assign, to the user plane ofthe UE, an IP address and an end point identifier of a tunnel from thelocal gateway to the eNB; and control the third sending module to send,to the MME, the IP address and the end point identifier of the tunnelfrom the local gateway to the eNB that are assigned by the thirdprocessing module.

A seventh aspect of the embodiments of the present application providesan MME, including:

an input apparatus, an output apparatus, a processor, and a memory,where

the processor is configured to perform the following steps by invokingan operation instruction stored in the memory:

instructing the input apparatus to receive an access request of userequipment UE that is sent by a base station eNB, where the accessrequest carries access information of the UE;

determining, according to the access information of the UE, a firstlocal gateway corresponding to the UE, where the first local gateway isa gateway of a first local network; and

establishing, for the UE, a user plane bearer that is from the eNB to agateway C-GW of a core network and that includes the first local gatewayused as an intermediate node.

With reference to the seventh aspect of the embodiments of the presentapplication, in a first implementation of the seventh aspect of theembodiments of the present application, before performing the step ofdetermining, according to the access information of the UE, a firstlocal gateway corresponding to the UE, the processor is furtherconfigured to perform the following steps:

obtaining function information of the eNB;

determining, according to the function information of the eNB, whetherthe eNB supports a local gateway connection; and

when determining that the eNB supports the local gateway connection,triggering the step of determining, according to the access informationof the UE, a first local gateway corresponding to the UE.

With reference to the seventh aspect or the first implementation of theseventh aspect of the embodiments of the present application, in asecond implementation of the seventh aspect of the embodiments of thepresent application, the access information includes the UE identifier,the UE identifier is used to uniquely identify the UE, and whenperforming the step of determining, according to the access informationof the UE, a first local gateway corresponding to the UE, the processorspecifically performs the following step:

searching, according to the UE identifier, a user management server forthe first local gateway corresponding to the UE.

With reference to the second implementation of the seventh aspect of theembodiments of the present application, in a third implementation of theseventh aspect of the embodiments of the present application, the firstlocal gateway is a local gateway having a highest priority in multiplelocal gateways corresponding to the UE.

With reference to the first implementation of the seventh aspect of theembodiments of the present application, in a fourth implementation ofthe seventh aspect of the embodiments of the present application, thefunction information of the eNB further includes information about alocal gateway accessed by the eNB, the access information includes theUE identifier, and the UE identifier is used to uniquely identify theUE; and when performing the step of determining, according to the accessinformation of the UE, a first local gateway corresponding to the UE,the processor specifically performs the following step:

determining, according to the information about the local gatewayaccessed by the eNB and the UE identifier, the first local gatewaycorresponding to the UE.

With reference to any one of the second implementation to the fourthimplementation of the seventh aspect of the embodiments of the presentapplication, in a fifth implementation of the seventh aspect of theembodiments of the present application, after performing the step ofestablishing, for the UE, a user plane bearer that is from the eNB tothe C-GW and that includes the first local gateway used as anintermediate node, the processor is further configured to perform thefollowing step:

when determining that a local gateway corresponding to the UE is updatedto a third local gateway, establishing, for the UE, a user plane bearerthat is from the eNB to the C-GW and that includes the third localgateway used as an intermediate node, where the third local gateway is agateway of a third local network.

With reference to any one of the second implementation to the fourthimplementation of the seventh aspect of the embodiments of the presentapplication, in a sixth implementation of the seventh aspect of theembodiments of the present application, the processor is furtherconfigured to perform the following steps:

obtaining, according to the UE identifier, a first subnet correspondingto the UE, where the first subnet is located in the first local network;and

sending a first routing instruction to the first local gateway, wherethe first routing instruction includes an identifier of the first subnetand the UE identifier, and the first routing instruction is used toinstruct to route, to the first subnet, data used by the UE to accessthe first local network.

With reference to the sixth implementation of the seventh aspect of theembodiments of the present application, in a seventh implementation ofthe seventh aspect of the embodiments of the present application, whenperforming the step of obtaining, according to the UE identifier, afirst subnet corresponding to the UE, the processor specificallyperforms the following steps:

determining, according to the UE identifier, a user group correspondingto the UE; and

determining, according to location information of the UE and/or acurrent time and the user group, the first subnet corresponding to theUE.

With reference to the sixth implementation or the seventh implementationof the seventh aspect of the embodiments of the present application, inan eighth implementation of the seventh aspect of the embodiments of thepresent application, after performing the step of establishing, for theUE, a user plane bearer that is from the eNB to a gateway C-GW of a corenetwork and that includes the first local gateway used as anintermediate node, the processor is further configured to perform thefollowing steps:

determining that a subnet corresponding to the UE is updated to a thirdsubnet;

determining that the third subnet is located in a second local network,wherein the second local network is different from the first localnetwork;

determining that a gateway of the second local network is a second localgateway; and

establishing, for the UE, a user plane bearer that is from the eNB tothe C-GW and that includes the second local gateway used as anintermediate node.

With reference to the eighth implementation of the seventh aspect of theembodiments of the present application, in a ninth implementation of theseventh aspect of the embodiments of the present application, afterperforming the step of determining that a gateway of the second localnetwork is a second local gateway, the processor is further configuredto perform the following step:

instructing the output apparatus to send a third routing instruction tothe second local gateway, where the third routing instruction includesan identifier of the third subnet and the UE identifier, and the routinginstruction is used to instruct to route, to the third subnet, data usedby the UE to access the second local network.

With reference to any one of the second implementation to the ninthimplementation of the seventh aspect of the embodiments of the presentapplication, in a tenth implementation of the seventh aspect of theembodiments of the present application, after performing the step ofestablishing, for the UE, a user plane bearer that is from the eNB tothe C-GW and that includes the local gateway used as an intermediatenode, the processor is further configured to perform the followingsteps:

obtaining, according to the UE identifier, a network name of the subnetcorresponding to the UE; and

sending the network name to the UE by using a non-access stratum NASmessage, so that the UE displays the network name on a user interface.

With reference to any one of the sixth implementation to the tenthimplementation of the seventh aspect of the embodiments of the presentapplication, in an eleventh implementation of the seventh aspect of theembodiments of the present application, the processor is furtherconfigured to perform the following steps:

notifying the C-GW of the subnet currently corresponding to the UE;

receiving a domain name system server address that is assigned to thesubnet corresponding to the UE and that is returned by the C-GW, where adomain name system server identified by the domain name system serveraddress stores a correspondence between a domain name and an IP addressof a network device in the subnet corresponding to the UE; and

sending, to the UE, the domain name system server address assigned tothe subnet corresponding to the UE.

With reference to any one of the seventh aspect to the eleventhimplementation of the seventh aspect of the embodiments of the presentapplication, in a twelfth implementation of the seventh aspect of theembodiments of the present application, the processor is furtherconfigured to perform the following steps:

notifying the C-GW of a local network currently corresponding to the UE;

receiving a domain name system server address that is assigned to thelocal network corresponding to the UE and that is returned by the C-GW,where a domain name system server identified by the domain name systemserver address stores a correspondence between a domain name and an IPaddress of a network device in the local network corresponding to theUE; and

sending, to the UE, the domain name system server address assigned tothe local network corresponding to the UE.

With reference to any one of the seventh aspect to the twelfthimplementation of the seventh aspect of the embodiments of the presentapplication, in a thirteenth implementation of the seventh aspect of theembodiments of the present application, when performing the step ofestablishing, for the UE, a user plane bearer that is from the eNB to agateway C-GW of a core network and that includes the first local gatewayused as an intermediate node, the processor specifically performs thefollowing steps:

instructing the input apparatus to obtain an IP address and an end pointidentifier of a tunnel from the local gateway to the C-GW that areassigned by the C-GW, and instructing the output apparatus to send, tothe local gateway, the IP address and the end point identifier of thetunnel from the local gateway to the C-GW that are assigned by the C-GW;

instructing the input apparatus to obtain an IP address and an end pointidentifier of a tunnel from the local gateway to the eNB that areassigned by the eNB, and instructing the output apparatus to send, tothe local gateway, the IP address and the end point identifier of thetunnel from the local gateway to the eNB that are assigned by the eNB;and

instructing the input apparatus to obtain an IP address and an end pointidentifier of a tunnel from the C-GW to the local gateway that areassigned by the local gateway and an IP address and an end pointidentifier of a tunnel from the eNB to the local gateway that areassigned by the local gateway, and instructing the output apparatus tosend, to the C-GW, the IP address and the end point identifier of thetunnel from the C-GW to the local gateway that are assigned by the localgateway, and to send, to the eNB, the IP address and the end pointidentifier of the tunnel from the eNB to the local gateway that areassigned by the local gateway.

An eighth aspect of the embodiments of the present application providesa local gateway, including:

an input apparatus, an output apparatus, a processor, and a memory,where

the processor is configured to perform the following steps by invokingan operation instruction stored in the memory:

instructing the input apparatus to receive a user plane establishmentrequest sent by a mobility management entity MME, where the user planeestablishment request includes information about a user plane bearerthat is established by a gateway C-GW of a core network for UE and thatis from the local gateway to the C-GW, the UE accesses the core networkby using an eNB, and the local gateway is a local gateway correspondingto the UE; and

establishing, for the UE according to the user plane establishmentrequest, a user plane bearer that is from the eNB to the C-GW and thatincludes the local gateway used as an intermediate node.

With reference to the eighth aspect of the embodiments of the presentapplication, in a first implementation of the eighth aspect of theembodiments of the present application, the processor is furtherconfigured to perform the following steps:

determining whether received data used by the UE to access a network isdata used to access the local network; and

when determining that the data used by the UE to access a network is thedata used to access the local network, instructing the output apparatusto route, to the local network, the data used by the UE to access anetwork; or when determining that the data used by the UE to access anetwork is not the data used to access the local network, instructingthe output apparatus to forward, to the C-GW, the data used by the UE toaccess a network.

With reference to the first implementation of the eighth aspect of theembodiments of the present application, in a second implementation ofthe eighth aspect of the embodiments of the present application, afterperforming the step of establishing, for the UE according to the userplane establishment request, a user plane bearer that is from the eNB tothe C-GW and that includes the local gateway used as an intermediatenode, and before performing the step of routing, to the local network,the data used by the UE to access a network, the processor is furtherconfigured to perform the following step:

determining, according to a UE identifier, a subnet corresponding to theUE, where the UE identifier is used to uniquely identify the UE, and theuser plane establishment request includes the UE identifier; and

when performing the step of routing, to the local network, the data usedby the UE to access a network, the processor specifically performs thefollowing step:

routing, to the subnet corresponding to the UE, the data used by the UEto access a network.

With reference to the first implementation of the eighth aspect of theembodiments of the present application, in a third implementation of theeighth aspect of the embodiments of the present application, afterperforming the step of establishing, for the UE according to the userplane establishment request, a user plane bearer that is from the eNB tothe C-GW and that includes the local gateway used as an intermediatenode, and before performing the step of routing, to the local network,the data used by the UE to access a network, the processor is furtherconfigured to perform the following step:

instructing the input apparatus to receive a routing instruction sent bythe MME, where the routing instruction includes a subnet identifier anda UE identifier, the UE identifier is used to uniquely identify the UE,and the subnet identifier is used to uniquely identify a subnet; and

when performing the step of routing, to the local network, the data usedby the UE to access a network, the processor specifically performs thefollowing step:

routing, according to the routing instruction to the subnet identifiedby the subnet identifier in the routing instruction, the data used bythe UE to access a network.

With reference to any one of the first implementation to the thirdimplementation of the eighth aspect of the embodiments of the presentapplication, in a fourth implementation of the eighth aspect of theembodiments of the present application, when performing the step ofdetermining whether received data used by the UE to access a network isdata used to access the local network, the processor specificallyperforms the following step:

when the data used by the UE to access a network is received,determining, according to a destination IP address of the data used bythe UE to access a network, whether the data used by the UE to access anetwork is the data used to access the local network, where the memorystores a list of an IP address of a network device in the local network.

With reference to the eighth aspect to the fourth implementation of theeighth aspect of the embodiments of the present application, in a fifthimplementation of the eighth aspect of the embodiments of the presentapplication, when performing the step of instructing the input apparatusto receive a user plane establishment request sent by a mobilitymanagement entity MME, the processor specifically performs the followingstep:

instructing the input apparatus to obtain an IP address and an end pointidentifier of a tunnel from the local gateway to the C-GW that areassigned by the C-GW to a user plane of the UE; and

when performing the step of establishing, for the UE according to theuser plane establishment request, a user plane bearer that is from theeNB to the C-GW and that includes the local gateway used as anintermediate node, the processor specifically performs the followingsteps:

assigning, to the user plane of the UE, an IP address and an end pointidentifier of a tunnel from the C-GW to the local gateway and an IPaddress and an end point identifier of a tunnel from the eNB to thelocal gateway; and

instructing the output apparatus to send, to the MME, the assigned IPaddress and end point identifier of the tunnel from the C-GW to thelocal gateway and the assigned IP address and end point identifier ofthe tunnel from the eNB to the local gateway.

A ninth aspect of the embodiments of the present application provides anbase station eNB, including:

an input apparatus, an output apparatus, a processor, and a memory,where

the processor is configured to perform the following operations byinvoking an operation instruction stored in the memory:

connecting UE and a core network, where a gateway of the core network isa C-GW;

establishing, for the UE, a user plane bearer that is from the eNB tothe C-GW and that includes a local gateway, corresponding to the UE,used as an intermediate node, where the local gateway is a gateway of alocal network; and

when the input apparatus receives data used by the UE to access thelocal network, instructing the output apparatus to send, to the localgateway, the data used to access the local network.

With reference to the ninth aspect of the embodiments of the presentapplication, in a first implementation of the ninth aspect of theembodiments of the present application, before the processor performsthe step of establishing, for the UE, a user plane bearer that is fromthe eNB to the C-GW and that includes a local gateway, corresponding tothe UE, used as an intermediate node, the processor is furtherconfigured to perform the following steps:

determining the local gateway or a subnet corresponding to the UE; and

instructing the output apparatus to notify an MME of the determinedlocal gateway or subnet corresponding to the UE.

With reference to the ninth aspect or the first implementation of theninth aspect of the embodiments of the present application, in a secondimplementation of the ninth aspect of the embodiments of the presentapplication, when performing the step of establishing, for the UE, auser plane bearer that is from the eNB to the C-GW and that includes alocal gateway, corresponding to the UE, used as an intermediate node,the processor specifically performs the following steps:

instructing the input apparatus to obtain an IP address and an end pointidentifier of a tunnel from the eNB to the local gateway that areassigned by the local gateway to a user plane of the UE;

assigning, to the user plane of the UE, an IP address and an end pointidentifier of a tunnel from the local gateway to the eNB; and

instructing the output apparatus to send, to the MME, the assigned IPaddress and end point identifier of the tunnel from the local gateway tothe eNB.

A tenth aspect of the embodiments of the present application provides asystem for accessing a local network, including:

the MME according to any one of the fourth aspect to the thirteenthimplementation of the fourth aspect of the embodiments of the presentapplication or any one of the seventh aspect to the thirteenthimplementation of the seventh aspect of the embodiments of the presentapplication, the local gateway according to any one of the fifth aspectto the fifth implementation of the fifth aspect of the embodiments ofthe present application or any one of the eighth aspect to the fifthimplementation of the eighth aspect of the embodiments of the presentapplication, the base station according to any one of the sixth aspectto the second implementation of the sixth aspect of the embodiments ofthe present application or any one of the ninth aspect to the secondimplementation of the ninth aspect of the embodiments of the presentapplication, and UE.

With reference to the tenth aspect of the embodiments of the presentapplication, in a first implementation of the tenth aspect of theembodiments of the present application, the system further includes:

a user management server, configured to store a correspondence betweenthe UE and a subnet and/or a local gateway; and

a domain name system server, configured to: store a correspondencebetween a domain name and an IP address of a network device in a subnetcorresponding to the UE, and covert a domain name of a service server inthe subnet corresponding to the UE to an IP address of the serviceserver.

It can be learned from the technical solutions that the embodiments ofthe present application have the following advantages: In theembodiments of the present application, the mobility management entityMME in the core network can determine, according to the accessinformation of the user equipment UE that is carried in the accessrequest of the UE that is sent by the base station eNB, the first localgateway corresponding to the UE, where the first local gateway is thegateway of the first local network; and establish, for the UE, the userplane bearer that is from the eNB to the gateway C-GW of the corenetwork and that includes the first local gateway used as theintermediate node. In this way, because the first local gateway is usedas the intermediate node in the user plane bearer, a data connection isestablished between the eNB and each of the gateway C-GW of the corenetwork and the gateway of the first local network. The UE can accessnot only the operator network but also the first local network by usingthe eNB, so that the user equipment can simultaneously access theoperator network and the local network.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic architectural diagram of a network systemaccording to an embodiment of the present application;

FIG. 2 is a schematic diagram of signaling exchange in a method foraccessing a local network according to an embodiment of the presentapplication;

FIG. 3 is a schematic flowchart of a method for accessing a localnetwork according to an embodiment of the present application;

FIG. 4 is another schematic flowchart of a method for accessing a localnetwork according to an embodiment of the present application;

FIG. 5A and FIG. 5B are another schematic flowchart of a method foraccessing a local network according to an embodiment of the presentapplication;

FIG. 6 is another schematic flowchart of a method for accessing a localnetwork according to an embodiment of the present application;

FIG. 7 is another schematic flowchart of a method for accessing a localnetwork according to an embodiment of the present application;

FIG. 8 is another schematic flowchart of a method for accessing a localnetwork according to an embodiment of the present application;

FIG. 9 is a schematic structural diagram of an MME according to anembodiment of the present application;

FIG. 10 is a schematic structural diagram of a local gateway accordingto an embodiment of the present application;

FIG. 11 is a schematic structural diagram of a base station according toan embodiment of the present application;

FIG. 12 is a schematic structural diagram of a network device accordingto an embodiment of the present application; and

FIG. 13 is a schematic structural diagram of a system for accessing alocal network according to an embodiment of the present application.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present application with reference to theaccompanying drawings in the embodiments of the present application.Apparently, the described embodiments are merely some but not all of theembodiments of the present application. All other embodiments obtainedby persons skilled in the art based on the embodiments of the presentapplication without creative efforts shall fall within the protectionscope of the present application.

The embodiments of the present application provide a method foraccessing a local network, and a related device, so that a userequipment can simultaneously use an operator network and a localnetwork.

It should be noted that in the embodiments of the present application,the method for accessing a local network is applied to a network system.As shown in FIG. 1, FIG. 1 is a schematic architectural diagram of anetwork system according to an embodiment of the present application. Inorder that a user accesses an operator network, a user plane bearer froma base station eNB to a gateway C-GW of a core network needs to beestablished for user equipment UE, so that information sent by the UE issent to the core network by using the eNB and the C-GW. Therefore,network devices in the network system are the UE, the eNB, and the corenetwork. The core network includes the gateway C-GW of the core networkand a mobility management entity MME of the core network.

In addition, a user management server (which may be configured on a CSGserver or another device) configured to store necessary user informationand a correspondence between the user information and other informationor a domain name system server DNS server configured to perform domainname resolution may exist in the network system. A message sent by theUE may be sent to a public data network PDN Internet by using the C-GWand the DNS server. To configure a server such as the user managementserver or the DNS server, the network system may further include an openplatform, Open Platform. In the software industry and a network, an openplatform means that a software system allows, by opening an applicationprogramming interface (API) or a function of the software system, anexternal program to use a function of the software system or use aresource of the software system, without a need to modify source code ofthe software system.

Further, in this embodiment of the present application, the informationabout the UE needs to be sent to a local network, so that the userequipment can simultaneously access the operator network and the localnetwork. Therefore, the network system further includes the localnetwork. The local network includes a local gateway L-GW of the localnetwork and a subnet that may exist in the local network, as indicatedby EN1, EN2, and EN3 in FIG. 1.

It may be understood that, in this embodiment of the presentapplication, in a communication process, each of the MME, the eNB, andthe local gateway may obtain a UE identifier that uniquely identifiesUE, and may search for a correspondence according to the UE identifierto obtain required information (for example, a corresponding localgateway, a corresponding user group, and a corresponding subnet). Forexample, the UE identifier may be an MSISDN, a temporary identifier, orany other identifier that can be used to identify a UE. The MSISDN is anumber that a calling user needs to dial to call a mobile subscriber ina Global System for Mobile Communications public land mobile network(GSM PLMN), functions the same as a public switched telephone network(PSTN) number, and is a unique number that can be recognized in anumbering plan of a public switched telephone network. In addition, inactual application, another identifier that can be obtained by each ofthe MME, the eNB, and the local gateway and can uniquely identify UE maybe used as the UE identifier. This is not limited herein.

Referring to FIG. 2, with reference to the network system shown in FIG.1, the following describes a method for accessing a local network in anembodiment of the present application from a perspective of signalingexchange between network devices.

201. UE accesses an eNB.

202. The eNB sends access information of the UE to an MME by using aninitial UE information (initial UE Message).

It may be understood that the access information of the UE is carried inan access request sent by the UE by using the eNB.

203. After obtaining the access information, the MME determines a localgateway corresponding to the UE.

It may be understood that the access information includes a UEidentifier used to uniquely identify the UE, such as an MSISDN, atemporary UE identifier, or any other identifier that can be used toidentify a UE. The MME or a user management server (for example, a CSGserver or another device) stores a correspondence between the UEidentifier and the local gateway. Specifically, the MME may determinethe local gateway in the following manners.

1. The MME searches for the correspondence according to the UEidentifier in the access information, to obtain the local gatewaycorresponding to the UE.

2. The MME may learn, by obtaining function information of the eNB, ofone or more local gateways connected to the eNB, and the MME may obtain,according to the UE identifier in the access information and informationabout the local gateway accessed by the eNB, the local gatewaycorresponding to the UE. Specifically, the function information of theeNB may be sent by the eNB to the MME, or may be obtained by the MME inanother manner, for example, obtained from a database by querying theeNB, a local network identifier, a local gateway identifier, or the likeby using a DNS server. This is not limited herein.

Optionally, if the eNB is connected to one local gateway, a specificmanner in which the MME may obtain, according to the UE identifier inthe access information and information about the local gateway accessedby the eNB, the local gateway corresponding to the UE may be as follows:If the MME learns, according to the UE identifier, that the usersupports a local network, the MME may determine that the local gatewayconnected to the eNB is the local gateway corresponding to the UE.

Optionally, if the eNB is connected to multiple local gateways, aspecific manner in which the MME may obtain, according to the UEidentifier in the access information and information about the localgateway accessed by the eNB, the local gateway corresponding to the UEmay be as follows: If the MME obtains two local gateways by searchingfor the correspondence according to the UE identifier, and one of thetwo local gateways is the local gateway accessed by the eNB, the MME maydetermine that the local gateway is the local gateway corresponding tothe UE.

3. The eNB may search for the correspondence and/or information about anaccessed local gateway according to the UE identifier, to obtain thelocal gateway corresponding to the UE; and then send the local gatewayto the MME. This is not limited herein.

204. The MME, the eNB, and the local gateway corresponding to the UEestablish, for the UE, a user plane bearer that is from the eNB to aC-GW and that includes the local gateway used as an intermediate node.

It may be understood that the user plane bearer that includes the localgateway used as the intermediate node means that: A user plane datachannel (which may be, for example, a PDN data channel or another datachannel, and is not limited herein) for accessing core network andInternet services by using the C-GW is established between the eNB andthe C-GW, and the local gateway is used as the intermediate node. On aneNB side, the eNB is connected to the local gateway. On a C-GW side, thelocal gateway is connected to the C-GW. A data flow used by the userequipment to access the core network and Internet services is forwardedby the L-GW between the eNB and the C-GW. Data used by the userequipment to access a service of the local network is locally routed bythe L-GW to the local network. For a specific procedure, refer to adescription in a subsequent embodiment.

In step 201 to step 204, the user plane bearer that is from the eNB tothe C-GW and that includes the local gateway used as the intermediatenode is established for the UE, so that the user equipment cansimultaneously access an operator network and the local network.

Optionally, step 205 and step 206 may be further included in anotherembodiment of the method for accessing a local network in thisembodiment of the present application. Data used by the UE to access thelocal network is routed to a specific subnet corresponding to the UE inthe local network, so that a data access process is more refined, so asto better control network access permission, and improve network systemsecurity. Specific descriptions are as follows:

205. The local gateway obtains a subnet identifier corresponding to theUE.

The subnet identifier is used to identify a subnet in the local network.The subnet may be one (for example, a subnet having a highest priority)of multiple subnets in the local network, or may be a unique subnet inthe local network (that is, the subnet may be the local network, and thesubnet identifier is an identifier of the local network). This is notlimited herein.

Optionally, after the user plane bearer that is from the eNB to the C-GWand that includes the local gateway, corresponding to the UE, used asthe intermediate node is established, the local gateway can obtain theUE identifier that uniquely identifies the UE. A correspondence betweenthe UE identifier and the subnet identifier may be stored in the usermanagement server or user subscription information. The local gatewaymay search for the correspondence according to the UE identifier thatuniquely identifies the UE, to obtain the subnet identifiercorresponding to the UE. In actual application, the MME may first searchfor the correspondence according to the UE identifier that uniquelyidentifies the UE, to obtain the subnet identifier corresponding to theUE, and then send the subnet identifier to the local gateway. This isnot limited herein.

Optionally, in actual application, a stored correspondence may include acorrespondence between the UE identifier and a user group and acorrespondence between the user group and the subnet identifier. Whendetermining a subnet corresponding to the UE, the MME may firstdetermine the user group according to the correspondence between the UEidentifier and the user group, and then determine, according to thecorrespondence between the user group and the subnet identifier, thesubnet identifier corresponding to the UE (for example, alternatively,the obtained function information of the eNB may include informationabout a subnet that is in the local network and that is supported by thelocal gateway L-GW connected to the eNB, and the MME may determine theuser group according to the UE identifier, and then determine, accordingto the user group and the information about the subnet that is supportedby the local gateway L-GW, the subnet identifier corresponding to theUE). Optionally, the subnet identifier may not exist, the user group isassociated with the subnet, and an identifier of the user group is usedas an identifier of the subnet. This is not limited herein.

206. The local gateway routes, to a subnet identified by the subnetidentifier, data used by the UE to access a local network.

It may be understood that, before routing, to the subnet identified bythe subnet identifier, the data used by the UE to access the localnetwork, when receiving data used by the UE to access a network (a datapacket carrying the data carries a source IP address and a destinationIP address of the data), the local gateway may determine, according tothe destination IP address of the data used by the UE to access anetwork, whether the data used by the UE to access a network is the dataused to access the local network. The local gateway stores a list of anIP address of a network device in the subnet corresponding to the UE.When determining that the received data is not the data used to accessthe local network, the local gateway forwards, to the C-GW, the dataused by the UE to access a network. The local gateway routes, to thesubnet identified by the subnet identifier, the data used by the UE toaccess the local network, only when determining that the received datais the data used to access the local network.

It should be noted that the local gateway obtains, in many manners, thelist of the IP address of the network device in the subnet correspondingto the UE. Optionally, the list may be configured by an open platform.Optionally, the list of the IP address of the network device in thesubnet corresponding to the UE may be read by the MME from a domain namesystem server, and then be sent to the local gateway. This is notlimited herein.

Optionally, step 207 to step 209 may be further included in anotherembodiment of the method for accessing a local network in thisembodiment of the present application, so that the UE can directlyaccess a service server in the subnet in the local network by using adomain name, to send a service request to the service server in thesubnet. In the foregoing embodiment, the user plane bearer that is fromthe eNB to the C-GW and that includes the local gateway, correspondingto the UE, used as the intermediate node is established, and the subnetcorresponding to the UE in the local network in which the local gatewayis used as a gateway is determined. In this case, the UE cansimultaneously access the local network and the operator network. Inactual application, the UE may directly access the service server in thesubnet by using an IP address, or may access the service server in thesubnet by using the domain name. In this case, domain name resolutionneeds to be performed on the domain name to obtain an IP address that isof the service server in the subnet and that corresponds to the domainname. After step 204 and before step 206 in the foregoing embodiment,steps 207 to 209 may be further included, so that the service server inthe subnet is accessed by using the domain name. Specific descriptionsare as follows:

207. The UE sends a domain name resolution request to a DNS server,where the domain name resolution request includes a domain name of aservice server in the subnet.

It should be noted that, on any occasion before step 207, the MME maysearch, according to the UE identifier that uniquely identifies the UE,for the correspondence that is between the UE identifier and the subnetidentifier and that is stored in the MME, the user management server, orthe user subscription information, to obtain the subnet identifiercorresponding to the UE; afterward, send the subnet identifiercorresponding to the UE to the C-GW; and then forward, to the UE, adomain name system server DNS server address that is assigned to thesubnet corresponding to the UE and that is returned by the C-GW. In thisway, the UE may determine the DNS server address.

After obtaining the DNS server address, the UE may send the domain nameresolution request to the DNS server. The domain name resolution requestincludes the domain name of the service server that is in the subnet andthat the UE requests to access.

208. The DNS server returns an IP address of the service server in thesubnet to the UE according to the domain name of the service server inthe subnet.

209. The UE sends a service request to the service server according tothe IP address.

It may be understood that, a correspondence that is in the DNS serverand that is between the domain name of the service server in the subnetand the IP address of the service server in the subnet may be configuredby using the open platform.

Optionally, step 210 to step 212 may be further included in anotherembodiment of the method for accessing a local network in thisembodiment of the present application. A network name of the subnet issent to the UE, so that the network name can be displayed on a userinterface of the UE, so as to help the user more intuitively know acurrently accessed subnet, and improve man-machine interactionperformance. Specific descriptions are as follows:

210. The MME obtains a network name of the subnet corresponding to theUE.

It may be understood that a correspondence between the UE identifier andthe network name of the subnet or a correspondence between the subnetand the network name of the subnet may be further stored in the MME, theuser management server, or the user subscription information. The MMEmay search for the correspondence according to the UE identifier or thesubnet corresponding to the UE, to obtain the network name of the subnetcorresponding to the UE.

211. The MME sends the network name to the UE by using a NAS message.

212. After receiving the network name sent by the MME by using the NASmessage, the UE displays the network name on a user interface of the UE.

It may be understood that after steps 201 to 204, steps 205 and 206,steps 207 to 209, and steps 210 to 212 may be combined with each other,or it is determined, according to an actual application situation,whether to perform the steps. This is not limited herein.

The foregoing describes the method for accessing a local network in thisembodiment of the present application from the perspective of signalingexchange between the devices in the network system. The followingdescribes a method for accessing a local network in an embodiment of thepresent application from a perspective of each network device.

1. From a perspective of an MME:

Referring to FIG. 3, an embodiment of a method for accessing a localnetwork in an embodiment of the present application includes thefollowing steps.

301. An MME receives an access request of user equipment UE that is sentby a base station eNB, where the access request carries accessinformation of the UE.

The MME is a mobility management entity of a core network, and a gatewayof the core network is a C-GW.

In this step, the UE first accesses the eNB, and then accesses the corenetwork by using the eNB, that is, sends, to the MME, the access requestfor accessing the core network. The access request carries the accessinformation of the UE. The access information includes a UE identifierthat uniquely identifies the UE.

302. The MME determines, according to the access information of the UE,a first local gateway corresponding to the UE.

The first local gateway is a gateway of a first local network.

It may be understood that the access information includes the UEidentifier used to uniquely identify the UE. The MME or a usermanagement server stores a correspondence between the UE identifier anda local gateway. The MME may search for the correspondence according tothe UE identifier in the access information, to obtain the first localgateway corresponding to the UE. In actual application, because the UEperforms access by using the eNB, the eNB may also search for thecorrespondence according to the UE identifier, to obtain the first localgateway corresponding to the UE; and then send the first local gatewayto the MME. This is not limited herein.

Optionally, in actual application, the MME may obtain functioninformation of the eNB. The function information may include informationabout a local gateway accessed by the eNB. Alternatively, the MME maydetermine, according to the information about the local gateway accessedby the eNB and a found local gateway corresponding to the UE identifier,the first local gateway corresponding to the UE. This is not limitedherein. Alternatively, the function information of the eNB may includeinformation about a subnet that is in a local network and that issupported by a local gateway L-GW connected to the eNB. It may beunderstood that the function information of the eNB may be sent by theeNB to the MME, or may be obtained by the MME in another manner, forexample, obtained from a database by querying the eNB, a local networkidentifier, a local gateway identifier, or the like by using a DNSserver. This is not limited herein.

303. The MME establishes, for the UE, a user plane bearer that is fromthe eNB to a C-GW and that includes the first local gateway used as anintermediate node.

After determining the first local gateway corresponding to the UE, theMME establishes, for the UE, the user plane bearer that is from the eNBto the C-GW and that includes the local gateway used as the intermediatenode.

In this embodiment of the present application, the mobility managemententity MME in the core network can determine, according to the accessinformation of the user equipment UE that is carried in the accessrequest of the UE that is sent by the base station eNB, the first localgateway corresponding to the UE, where the first local gateway is thegateway of the first local network; and establish, for the UE, the userplane bearer that is from the eNB to the gateway C-GW of the corenetwork and that includes the first local gateway used as theintermediate node. In this way, because the first local gateway is usedas the intermediate node in the user plane bearer, a data connection isestablished between the eNB and each of the gateway C-GW of the corenetwork and the gateway of the first local network. The UE can accessnot only an operator network but also the first local network by usingthe eNB, so that a user equipment can simultaneously access the operatornetwork and the local network.

In the foregoing embodiment, the MME determines the first local gatewaycorresponding to the UE. In actual application, the MME determines thefirst local gateway in multiple manners. The MME may determine the firstlocal gateway directly by using a local gateway corresponding to the UE,or by using a subnet corresponding to the UE. In addition, the UE maycorrespond to one or more local gateways or subnets. This is not limitedherein. The following specifically describes, by using the several casesas examples, a method for accessing a local network in an embodiment ofthe present application.

1. UE directly corresponds to a local gateway.

Referring to FIG. 4, another embodiment of a method for accessing alocal network in an embodiment of the present application includes thefollowing steps.

401. An MME receives an access request of user equipment UE that is sentby an base station eNB, where the access request carries accessinformation of the UE.

The MME is a mobility management entity of a core network, and a gatewayof the core network is a C-GW.

In this step, the UE first accesses the eNB, and then accesses the corenetwork by using the eNB, that is, sends, to the MME, the access requestfor accessing the core network. The access request carries the accessinformation of the UE. The access information includes a UE identifierthat uniquely identifies the UE.

402. The MME determines whether the eNB supports a local gatewayconnection.

The access information may further include an identifier of the eNB. Itmay be understood that the MME or the core network may store functioninformation of each eNB. The function information of each eNB records afunction supported by the eNB. The MME may query the function of eacheNB by using an identifier of the eNB. In this step, the MME maydetermine, by querying a function of the eNB, whether the eNB supportsthe local gateway connection.

Alternatively, the function information of the eNB may includeinformation about a subnet that is in a local network and that issupported by a local gateway L-GW connected to the eNB. It may beunderstood that the function information of the eNB may be sent by theeNB to the MME, or may be obtained by the MME in another manner, forexample, obtained from a database by querying the eNB, a local networkidentifier, a local gateway identifier, or the like by using a DNSserver. This is not limited herein.

In actual application, the MME may first determine whether the eNBaccessed by the UE supports the local gateway connection, and triggerstep 403 only when determining that the eNB supports the local gatewayconnection, or when determining that the eNB does not support the localgateway connection, may directly connect the UE and the core network,and does not need to perform subsequent steps in this embodiment.

403. When determining that the eNB supports the local gatewayconnection, the MME searches, according to a UE identifier, a usermanagement server for a first local gateway having a highest priority inmultiple local gateways corresponding to the UE, where the multiplelocal gateways have different priorities, the access informationincludes the UE identifier, and the UE identifier is used to uniquelyidentify the UE.

In this step, the user management server stores a correspondence betweenthe UE and a local gateway. The correspondence may be specifically acorrespondence between the local gateway and the UE identifier thatuniquely identifies the UE. One UE may correspond to multiple localgateways, and the local gateways have different priorities. Whendetermining that the eNB supports the local gateway connection, the MMEsearches the user management server for a local gateway having a highestpriority in the multiple local gateways corresponding to the UE, anduses the local gateway as the first local gateway. Optionally, in actualapplication, when one UE corresponds to multiple local gateways, a localgateway having an optimal calculation result may be selected as thefirst local gateway according to load balance calculation. Optionally,in actual application, the MME may obtain the function information ofthe eNB. The function information may include information about a localgateway accessed by the eNB. Alternatively, the MME may determine,according to the information about the local gateway accessed by the eNBand a found local gateway corresponding to the UE identifier, the firstlocal gateway corresponding to the UE. Alternatively, there may beanother manner of determining a local gateway currently corresponding tothe UE in the multiple local gateways corresponding to the UE. This isnot limited herein.

It may be understood that, in actual application, the UE may correspondto only one local gateway. In this case, the MME uses the local gatewaycorresponding to the UE as the first local gateway.

404. The MME establishes, for the UE, a user plane bearer that is fromthe eNB to a C-GW and that includes the first local gateway used as anintermediate node.

After determining the first local gateway corresponding to the UE, theMME establishes, for the UE, the user plane bearer that is from the eNBto the C-GW and that includes the first local gateway used as theintermediate node.

It may be understood that the user plane bearer that includes the firstlocal gateway used as the intermediate node means that: A user planedata channel (which may be, for example, a PDN data channel or anotherdata channel, and is not limited herein) for accessing core network andInternet services by using the C-GW is established between the eNB andthe C-GW, and the first local gateway is used as the intermediate node.On an eNB side, the eNB is connected to the first local gateway. On aC-GW side, the first local gateway is connected to the C-GW. A data flowused by the user equipment to access the core network and Internetservices is forwarded by the first local gateway between the eNB and theC-GW. Data used by the user equipment to access a service of a firstlocal network is locally routed by the first local gateway to the firstlocal network.

405. The MME obtains a first subnet corresponding to the UE.

After establishing the user plane bearer that is from the eNB to theC-GW and in which the first local gateway is used as the intermediatenode, the MME may obtain the first subnet corresponding to the UE.

It may be understood that, a correspondence between the UE and a subnetmay be stored in the user management server, may be stored in usersubscription data, or may be stored in another location such as thelocal gateway. This is not limited herein.

It may be understood that, in actual application, the MME obtains, inmany manners, the first subnet corresponding to the UE. Optionally, theMME may first determine a user group corresponding to the UE, and thendetermine, according to location information of the UE and/or a currenttime and the user group, the first subnet corresponding to the UE. Thelocation information of the UE may be current location information ofthe UE that is reported by the UE or obtained by the MME, or may be anidentifier of the eNB. This is not limited herein.

For example, if the UE belongs to a user group 1, it may be set in sucha manner that the user group 1 corresponds to a subnet 1 before 12:00am, and that the user group 1 corresponds to a subnet 2 after 12:00 am.Alternatively, there may be a correspondence between the subnet andanother combination of the user group, the location information of theUE, and the current time. This is not limited herein.

406. The MME sends a first routing instruction to the first localgateway, where the first routing instruction includes an identifier ofthe first subnet and the UE identifier, and the first routinginstruction is used to instruct to route, to the first subnet, data usedby the UE to access a first local network.

After obtaining the identifier of the first subnet corresponding to theUE, the MME sends the first routing instruction to the first localgateway. The first routing instruction includes the identifier of thefirst subnet and the UE identifier. The first routing instruction isused to instruct to route, to the first subnet, the data used by the UEto access the first local network.

In steps 405 and 406, the MME may obtain the identifier of the firstsubnet corresponding to the UE, and then send the first routinginstruction to the local gateway. In actual application, in addition tothe MME, the local gateway may obtain a subnet corresponding to the UE.In this case, the MME no longer needs to obtain the subnet. This is notlimited herein. Therefore, it may be understood that, in thisembodiment, in different application scenarios, steps 405 and 406 may ormay not exist. This is not limited herein.

Optionally, in actual application, the MME may further send anidentifier of a subnet corresponding to the UE to the C-GW, and thenreceive a domain name system server address that is assigned to thesubnet corresponding to the UE and that is returned by the C-GW. Adomain name system server identified by the domain name system serveraddress stores a correspondence between a domain name and an IP addressof a network device in the subnet corresponding to the UE.

Optionally, in actual application, the MME may further send anidentifier of a local network corresponding to the UE to the C-GW, andthen receive a domain name system server address that is assigned to thelocal network corresponding to the UE and that is returned by the C-GW.A domain name system server identified by the domain name system serveraddress stores a correspondence between a domain name and an IP addressof a network device in the local network corresponding to the UE.

407. When the MME determines that a local gateway having a highestpriority is updated to a third local gateway, the MME establishes, forthe UE, a user plane bearer that is from the eNB to the C-GW and thatincludes the third local gateway used as an intermediate node, where thethird local gateway is different from the first local gateway.

After the first local gateway is used as the intermediate node of theuser plane bearer, the user may also change, according to an actualrequirement, the local network corresponding to the local gatewaycorresponding to the UE, for example, change a priority of each of themultiple local gateways corresponding to the UE, so that the localgateway having the highest priority is updated to another local gatewaysuch as the third local gateway. The third local gateway is a gateway ofa third local network. The MME can obtain, by monitoring a local-gatewaypriority change or receiving a message sent by the user managementserver, an update to the priorities of the local gateways correspondingto the UE. When the MME determines that the local gateway having thehighest priority is updated to the third local gateway, the MMEestablishes, for the UE, the user plane bearer that is from the eNB tothe C-GW and that includes the third local gateway used as theintermediate node. It may be understood that, in addition, the MME maydelete the user plane bearer in which the first local gateway is used asthe intermediate node. The third local gateway is different from thefirst local gateway.

It should be noted that, after the user plane bearer in which the thirdlocal gateway is used as the intermediate node is established, anidentifier of a subnet corresponding to the UE in the third localnetwork may also be determined. This is not limited herein.

It may be understood that, according to an actual application situation,in different application scenarios, step 407 may or may not exist. Thisis not limited herein.

408. The MME obtains a network name of a subnet corresponding to the UE.

409. The MME sends the network name to the UE by using a non-accessstratum NAS message, so that the UE displays the network name on a userinterface.

It may be understood that, according to an actual application situation,in different application scenarios, steps 408 and 409 may or may notexist. This is not limited herein.

In this embodiment of the present application, the MME can determine thelocal gateway that has the highest priority and that corresponds to theUE, and establish the user plane bearer in which the local gateway isused as the intermediate node, so that an operator network and the localnetwork in which the local gateway is used as a gateway aresimultaneously accessed. Further, the MME can determine the identifierof the subnet corresponding to the UE in the local network, and send therouting instruction to the local gateway, so that the local gatewayroutes, to the subnet, all data used by the UE to access the localnetwork, so as to implement precise control on network accesspermission.

2. UE corresponds to a subnet, and a local gateway corresponding to theUE is determined by using the subnet.

Referring to FIG. 5A and FIG. 5B, another embodiment of a method foraccessing a local network in an embodiment of the present applicationincludes the following steps.

501. An MME receives an access request for accessing a core network thatis sent by user equipment UE by using a base station eNB, where theaccess request carries access information of the UE.

502. The MME determines whether the eNB supports a local gatewayconnection.

Steps 501 and 502 are similar to steps 401 and 402. Details are notdescribed herein again.

503. When determining that the eNB supports the local gatewayconnection, the MME determines, according to a UE identifier, a secondsubnet corresponding to the UE.

In this embodiment, a correspondence exists between the UE and a subnet.In addition, one UE may correspond to multiple subnets, and the multiplesubnets have different priorities.

It may be understood that the MME or a user management server stores thecorrespondence between the UE and the subnet. The correspondence may bespecifically a correspondence between the subnet and the UE identifierthat uniquely identifies the UE. The MME may determine, according to thecorrespondence and the UE identifier that uniquely identifies the UE andthat is in the access information, the second subnet corresponding tothe UE.

In this step, the MME can determine the second subnet corresponding tothe UE. The second subnet is a subnet having a highest priority inmultiple subnets currently corresponding to the UE or a subnet uniquelycorresponding to the UE.

It may be understood that, the MME may determine, by monitoring orsearching the user management server or user subscription data, thesecond subnet corresponding to the UE; or may determine, by receiving amessage that includes the second subnet corresponding to the UE and thatis sent by the user management server or the eNB, the second subnetcorresponding to the UE. This is not limited herein.

Optionally, the MME may first obtain a user group corresponding to theUE, and then determine, according to location information of the UEand/or a current time and the user group, the second subnetcorresponding to the UE. The location information of the UE may becurrent location information of the UE that is reported by the UE orobtained by the MME, or may be an identifier of the eNB. This is notlimited herein.

For example, if the UE belongs to a user group 3, it may be set in sucha manner that the user group 3 corresponds to a subnet 3 when the UE isat a location 1, and corresponds to a subnet 4 when the UE is at alocation 2. Alternatively, there may be a correspondence between thesubnet and another combination of the user group, the locationinformation of the UE, and the current time. This is not limited herein.

504. The MME determines that the second subnet is located in a firstlocal network.

After determining the second subnet corresponding to the UE, the MMEdetermines that the second subnet is located in the first local network.

505. The MME determines that a gateway of the first local network is afirst local gateway.

After determining that the second subnet corresponding to the UE islocated in the first local network, the MME determines that the gatewayof the first local network is the first local gateway.

506. The MME establishes, for the UE, a user plane bearer that is fromthe eNB to a C-GW and that includes the first local gateway used as anintermediate node.

This step is similar to step 404. Details are not described hereinagain.

507. The MME sends a second routing instruction to the first localgateway, where the second routing instruction includes an identifier ofthe second subnet and a UE identifier, and the routing instruction isused to instruct to route, to the second subnet, data used by the UE toaccess the first local network.

After establishing, for the UE, the user plane bearer in which the firstlocal gateway is used as the intermediate node, the MME sends the secondrouting instruction to the first local gateway. The second routinginstruction includes the identifier of the second subnet correspondingto the UE and the UE identifier. The routing instruction is used toinstruct to route, to the second subnet uniquely identified by theidentifier of the second subnet, the data used by the UE to access thefirst local network.

Optionally, in actual application, the MME may further send anidentifier of a subnet corresponding to the UE to the C-GW, and thenreceive a domain name system server address that is assigned to thesubnet corresponding to the UE and that is returned by the C-GW. Adomain name system server identified by the domain name system serveraddress stores a correspondence between a domain name and an IP addressof a network device in the subnet corresponding to the UE.

Optionally, in actual application, the MME may further send anidentifier of a local network corresponding to the UE to the C-GW, andthen receive a domain name system server address that is assigned to thelocal network corresponding to the UE and that is returned by the C-GW.A domain name system server identified by the domain name system serveraddress stores a correspondence between a domain name and an IP addressof a network device in the local network corresponding to the UE.

508. The MME determines that a subnet corresponding to the UE is updatedto a third subnet.

In actual application, according to a requirement, the user can changethe subnet corresponding to the UE or a priority of the subnet, so thatthe subnet uniquely corresponding to the UE or having the highestpriority is updated to another subnet such as the third subnet. Thethird subnet and the second subnet are different, and are located indifferent local networks. The MME can obtain, by monitoring the subnet(the priority of the subnet) corresponding to the UE or receiving amessage sent by the user management server, an update to the subnetcorresponding to the UE. In this step, the MME may determine that thesubnet corresponding to the UE is updated to the third subnet. The thirdsubnet is a subnet having a highest priority in the multiple subnetscurrently corresponding to the UE or a subnet uniquely corresponding tothe UE.

It may be understood that, the MME may determine, by monitoring orsearching the user management server or the user subscription data, thatthe subnet corresponding to the UE is updated to the third subnet; ormay determine, by receiving a message that includes informationindicating that the subnet identifier corresponding to the UE is updatedto the third subnet and that is sent by the user management server orthe eNB, that the subnet identifier corresponding to the UE is updatedto the third subnet. Alternatively, the MME may determine, because acombination of the user group corresponding to the UE and the locationinformation of the UE and/or the current time corresponds to the thirdsubnet, that the subnet corresponding to the UE is updated to the thirdsubnet. This is not limited herein.

509. The MME determines that the third subnet is located in a secondlocal network, wherein the second local network is different from thefirst local network.

After determining that the subnet corresponding to the UE is updated tothe third subnet, the MME determines that the third subnet is located inthe second local network, wherein the second local network is differentfrom the first local network.

It should be understood that, in this step, the second local network inwhich the updated subnet corresponding to the UE is located is differentfrom the first local network. In actual application, in some scenarios,the second local network in which the updated subnet corresponding tothe UE is located and the first local network may be a same localnetwork. This is not limited herein.

510. The MME determines that a gateway of the second local network is asecond local gateway.

After determining that the updated third subnet corresponding to the UEis located in the second local network, the MME determines that thegateway of the second local network is the second local gateway.

511. The MME establishes, for the UE, a user plane bearer that is fromthe eNB to the C-GW and that includes the second local gateway used asan intermediate node, where the second local gateway is different fromthe first local gateway.

It may be understood that the user plane bearer that includes the secondlocal gateway used as the intermediate node means that: A user planedata channel (which may be, for example, a PDN data channel or anotherdata channel, and is not limited herein) for accessing core network andInternet services by using the C-GW is established between the eNB andthe C-GW, and the second local gateway is used as the intermediate node.On an eNB side, the eNB is connected to the second local gateway. On aC-GW side, the second local gateway is connected to the C-GW. A dataflow used by the user equipment to access the core network and Internetservices is forwarded by the second local gateway between the eNB andthe C-GW. Data used by the user equipment to access a service of thesecond local network is locally routed by the second local gateway tothe second local network.

512. The MME sends a third routing instruction to the second localgateway, where the third routing instruction includes an identifier ofthe third subnet and the UE identifier, and the routing instruction isused to instruct to route, to the third subnet, data used by the UE toaccess the second local network.

It may be understood that, according to different actual applicationscenarios, steps 508 to 512 may or may not exist. This is not limitedherein.

513. The MME obtains a network name of the subnet corresponding to theUE.

514. The MME sends the network name to the UE by using a non-accessstratum NAS message, so that the UE displays the network name on a userinterface.

It may be understood that, according to an actual application situation,in different application scenarios, steps 513 and 514 may or may notexist. This is not limited herein.

In this embodiment of the present application, the MME can determine thesubnet that has the highest priority and that corresponds to the UE orthe subnet that uniquely corresponds to the UE, obtain the local networkin which the subnet is located, then determine the local gateway of thelocal network, and establish, for the UE, the user plane bearer by usingthe local gateway as the intermediate node, so that an operator networkand the local network are simultaneously accessed. In addition, the MMEsends the routing instruction to the local gateway to instruct the localgateway to route, to the subnet corresponding to the UE, the data usedby the UE to access the local network, so as to implement precisecontrol on network access permission.

2. From a perspective of a local gateway:

An embodiment of a method for accessing a local network in an embodimentof the present application includes:

receiving, by a local gateway, a user plane establishment request sentby an MME, where the user plane establishment request includesinformation about a user plane bearer that is from the local gateway toa C-GW and that is established by the MME for UE, the MME is a mobilitymanagement entity of a core network, a gateway of the core network isthe C-GW, the UE accesses the core network by using an eNB, and thelocal gateway is a local gateway corresponding to the UE; and

establishing, by the local gateway for the UE according to the userplane establishment request, a user plane bearer that is from the eNB tothe C-GW and that includes the local gateway used as an intermediatenode.

In this embodiment, the local gateway can establish, for the UE, theuser plane bearer in which the local gateway is used as the intermediatenode, so that the UE accesses an operator network and a local network inwhich the local gateway is used as a gateway.

In actual application, there may be multiple different subnets in thelocal network. Each subnet is uniquely identified by a different subnetidentifier. The UE may have permission to access some of the subnets,that is, correspond to some or one of the subnets. The correspondencemay be determined by the local gateway by means of querying, or may bedetermined according to a routing instruction sent by the MME. This isnot limited herein. Descriptions are separately provided below.

1. A local gateway obtains a correspondence by means of querying.

Referring to FIG. 6, another embodiment of a method for accessing alocal network in an embodiment of the present application includes thefollowing steps.

601. A local gateway receives a user plane establishment request sent byan MME.

The user plane establishment request includes information about a userplane bearer that is from the local gateway to a C-GW and that isestablished by the MME for UE. The MME is a mobility management entityof a core network. A gateway of the core network is the C-GW. The UEaccesses the core network by using an eNB. The local gateway is a localgateway corresponding to the UE.

602. The local gateway establishes, for a UE according to the user planeestablishment request, a user plane bearer that is from an eNB to a C-GWand that includes the local gateway used as an intermediate node.

603. The local gateway determines, according to a UE identifier, asubnet corresponding to the UE.

It may be understood that the local gateway may store a correspondencebetween the UE and the subnet, or may obtain the correspondence betweenthe UE and the subnet from a user management server or user subscriptiondata. This is not limited herein. The UE is uniquely identified by theUE identifier. The UE identifier may be carried in the user planeestablishment request, or may be carried in other information sent bythe MME to the local gateway. This is not limited herein.

604. When the local gateway receives data used by the UE to access alocal network, the local gateway routes, to the subnet corresponding tothe UE, the data used to access the local network.

Optionally, in actual application, the local gateway stores a list of anIP address of a network device in the subnet corresponding to the UE.The list may be configured by an open platform in the local gateway, ormay be forwarded by the MME. When the local gateway receives data usedby the UE to access a network, the local gateway determines, accordingto a destination IP address of the data used by the UE to access anetwork, whether the data used by the UE to access a network is the dataused to access the local network. When determining that the receiveddata is not the data used to access the local network, the local gatewayforwards, to the C-GW, the data used by the UE to access a network; orwhen determining that the received data is the data used to access thelocal network, routes, to the subnet corresponding to the UE, the dataused by the UE to access the local network.

In this embodiment, after establishing, for the UE, the user planebearer in which the local gateway is used as the intermediate node, thelocal gateway obtains the subnet corresponding to the UE, and routes, tothe subnet corresponding to the UE, the data used by the UE to accessthe local network, so as to implement fine control on network accesspermission.

2. A correspondence is determined according to a routing instructionsent by an MME.

Referring to FIG. 7, another embodiment of a method for accessing alocal network in an embodiment of the present application includes thefollowing steps.

701. A local gateway receives a user plane establishment request sent byan MME.

The user plane establishment request includes information about a userplane bearer that is from the local gateway to a C-GW and that isestablished by the MME for UE. The MME is a mobility management entityof a core network. A gateway of the core network is the C-GW. The UEaccesses the core network by using an eNB. The local gateway is a localgateway corresponding to the UE.

702. The local gateway establishes, for the UE according to the userplane establishment request, a user plane bearer that is from an eNB toa C-GW and that includes the local gateway used as an intermediate node.

703. The local gateway receives a routing instruction sent by the MME,where the routing instruction includes a subnet identifier and a UEidentifier, the subnet identifier is used to uniquely identify a subnet,and the UE identifier is used to uniquely identify the UE.

704. The local gateway routes, according to the routing instruction tothe subnet identified by the subnet identifier, data used by the UE toaccess a local network.

Optionally, in actual application, the local gateway stores a list of anIP address of a network device in the subnet corresponding to the UE.The list may be configured by an open platform in the local gateway, ormay be forwarded by the MME. When the local gateway receives data usedby the UE to access a network, the local gateway determines, accordingto a destination IP address of the data used by the UE to access anetwork, whether the data used by the UE to access a network is the dataused to access the local network. When determining that the receiveddata is not the data used to access the local network, the local gatewayforwards, to the C-GW, the data used by the UE to access a network; orwhen determining that the received data is the data used to access thelocal network, routes, to the subnet identified by the subnetidentifier, the data used by the UE to access the local network.

In this embodiment of the present application, the MME obtains thesubnet identifier corresponding to the UE, and the local gatewayreceives the routing instruction sent by the MME, and routes, accordingto the routing instruction to the subnet identified by the subnetidentifier, the data used by the UE to access the local network, so asto implement fine control on network access permission, and relieve dataprocessing pressure of the local gateway.

3. From a perspective of an eNB:

Referring to FIG. 8, another embodiment of a method for accessing alocal network in an embodiment of the present application includes thefollowing steps:

801. An eNB connects UE and a core network, where a gateway of the corenetwork is a C-GW.

802. The eNB establishes, for the UE, a user plane bearer that is fromthe eNB to the C-GW and that includes a local gateway, corresponding tothe UE, used as an intermediate node, where the local gateway is agateway of a local network.

803. When the eNB receives data used by the UE to access the localnetwork, the eNB sends, to the local gateway, the data used to accessthe local network.

It may be understood that, the eNB can determine, by using a destinationIP address of data used by the UE to access a network, that the data isthe data used to access the local network; and send the data to thelocal gateway. Alternatively, the eNB may send, to the local gateway,data used by the UE to access all networks. This is not limited herein.

In this embodiment, after establishing, for the UE, the user planebearer in which the local gateway is used as the intermediate node, theeNB can send, to the local gateway, the received data used by the UE toaccess the local network, so that an operator network and the localnetwork are simultaneously accessed.

Optionally, in another embodiment of the method for accessing a localnetwork in this embodiment of the present application, beforeestablishing, for the UE, the user plane bearer in which the localgateway is used as the intermediate node, the eNB may first determine alocal gateway or a local gateway identifier corresponding to the UE, andthen notify the MME of the determined local gateway or local gatewayidentifier corresponding to the UE.

In the foregoing embodiments, there may be multiple specificimplementations in which the MME, the local gateway, and the eNBestablish, for the UE, the user plane bearer that is from the eNB to theC-GW and that includes the local gateway used as the intermediate node.For example, the implementations may be as follows:

The C-GW assigns an IP address and an end point identifier of a tunnelfrom the local gateway to the C-GW.

The MME obtains the IP address and the end point identifier of thetunnel from the local gateway to the C-GW that are assigned by the C-GW,and sends, to the local gateway, the IP address and the end pointidentifier of the tunnel from the local gateway to the C-GW that areassigned by the C-GW.

The local gateway obtains the IP address and the end point identifier ofthe tunnel from the local gateway to the C-GW that are assigned by theC-GW to a user plane of the UE.

The local gateway assigns, to the user plane of the UE, an IP addressand an end point identifier of a tunnel from the C-GW to the localgateway and an IP address and an end point identifier of a tunnel fromthe eNB to the local gateway, and sends, to the MME, the IP address andthe end point identifier of the tunnel from the C-GW to the localgateway that are assigned by the local gateway and the IP address andthe end point identifier of the tunnel from the eNB to the local gatewaythat are assigned by the local gateway.

The MME obtains the IP address and the end point identifier of thetunnel from the C-GW to the local gateway that are assigned by the localgateway and the IP address and the end point identifier of the tunnelfrom the eNB to the local gateway that are assigned by the localgateway, sends, to the C-GW, the IP address and the end point identifierof the tunnel from the C-GW to the local gateway that are assigned bythe local gateway, and sends, to the eNB, the IP address and the endpoint identifier of the tunnel from the eNB to the local gateway thatare assigned by the local gateway.

The eNB obtains the IP address and the end point identifier of thetunnel from the eNB to the local gateway that are assigned by the localgateway to the user plane of the UE.

The eNB assigns, to the user plane of the UE, an IP address and an endpoint identifier of a tunnel from the local gateway to the eNB, andsends, to the MME, the IP address and the end point identifier of thetunnel from the local gateway to the eNB that are assigned by the eNB.

The MME obtains the IP address and the end point identifier of thetunnel from the local gateway to the eNB that are assigned by the eNB,and sends, to the local gateway, the IP address and the end pointidentifier of the tunnel from the local gateway to the eNB that areassigned by the eNB.

It may be understood that, there is no time sequence relationshipbetween the foregoing assignment actions, and assignment may beperformed in any time sequence. This is not limited herein.

In actual application, the IP addresses and the end point identifiers ofthe tunnels may be obtained by using messages between network elements.There may be multiple specific implementations. The followingspecifically describes, by using one manner as an example, a process ofestablishing the user plane bearer in which the local gateway is used asthe intermediate node.

1. An MME sends a first request to a local gateway, where the firstrequest is used to request to establish a data channel from the localgateway to each of an eNB and a C-GW.

It may be understood that, in actual application, optionally, a UEidentifier used to uniquely identify UE may be carried in the firstrequest, or the UE identifier may be carried in other information sentby the MME to the local gateway. This is not limited herein.

2. The local gateway receives the first request sent by the MME, wherethe first request includes an IP address and an end point identifier ofa tunnel from the local gateway to the C-GW that are assigned by theC-GW to a user plane of UE.

It should be noted that, in a core network, the MME can directlycommunicate with the C-GW, for example, control the C-GW to assign userplane information, notify the C-GW of the obtained information, and senda message by using the C-GW.

In this step, the MME controls the C-GW to assign the IP address and theend point identifier of the tunnel from the local gateway to the C-GW.It may be understood that the IP address and the end point identifier ofthe tunnel from the local gateway to the C-GW enable, to establish thedata channel from the local gateway to the C-GW, the local gateway thatobtains the information, so that the local gateway can send informationto the C-GW by using the data channel, that is, can send information tothe MME.

3. The local gateway returns a first response to the MME, where thefirst response includes an IP address and an end point identifier of atunnel from the C-GW to the local gateway that are assigned by the localgateway to the user plane of the UE and an IP address and an end pointidentifier of a tunnel from the eNB to the local gateway that areassigned by the local gateway to the user plane of the UE.

It may be understood that the IP address and the end point identifier ofthe tunnel from the C-GW to the local gateway that are assigned to theuser plane of the UE enable, to establish a data channel from the C-GWto the local gateway, the C-GW that obtains the information, so that theC-GW can send information to the local gateway by using the datachannel. Similarly, the IP address and the end point identifier of thetunnel from the eNB to the local gateway that are assigned to the userplane of the UE enable, to establish a data channel from the eNB to thelocal gateway, the eNB that obtains the information, so that the eNB cansend information to the local gateway by using the data channel.

4. The MME sends a second request to the eNB, where the second requestis used to request to establish a data channel from the eNB to the localgateway.

5. The eNB receives the second request sent by the MME, where the secondrequest includes the IP address and the end point identifier of thetunnel from the eNB to the local gateway that are assigned by the localgateway to the user plane of the UE.

After obtaining the IP address and the end point identifier of thetunnel from the eNB to the local gateway that are assigned by the localgateway to the user plane of the UE, the eNB may establish the datachannel from the eNB to the local gateway. The eNB may send a message tothe local gateway by using the data channel, and the UE performs accessby using the eNB, that is, the local gateway may receive, by using thedata channel, a message sent by the UE.

6. The eNB returns a second response to the MME, where the secondresponse includes an IP address and an end point identifier of a tunnelfrom the local gateway to the eNB that are assigned by the eNB to theuser plane of the UE.

7. The MME sends, to the local gateway, the IP address and the end pointidentifier of the tunnel from the local gateway to the eNB that areassigned by the eNB to the user plane of the UE.

After obtaining the IP address and the end point identifier of thetunnel from the local gateway to the eNB that are assigned by the eNB tothe user plane of the UE, the local gateway may establish the datachannel from the local gateway to the eNB, and may send a message to theeNB by using the data channel.

The following separately describes network devices in the embodiments ofthe present application.

1. MME:

Referring to FIG. 9, an embodiment of an MME in an embodiment of thepresent application includes:

a first receiving module 901, configured to receive an access requestsent by user equipment UE by using a base station eNB, where the accessrequest carries access information of the UE; and

a first processing module 902, configured to: determine, according tothe access information of the UE, a first local gateway corresponding tothe UE, where the first local gateway is a gateway of a first localnetwork; and establish, for the UE, a user plane bearer that is from theeNB to a gateway C-GW of a core network and that includes the firstlocal gateway used as an intermediate node.

In this embodiment of the present application, when the UE accesses thecore network by using the eNB, the first processing module 902determines the first local gateway corresponding to the UE, where thefirst local gateway is the gateway of the first local network; andestablishes, for the UE, the user plane bearer that is from the eNB tothe gateway C-GW of the core network and that includes the first localgateway used as the intermediate node. In this way, because the firstlocal gateway is used as the intermediate node in the user plane bearer,a data connection is established between the eNB and each of the gatewayC-GW of the core network and the gateway of the first local network. TheUE accesses not only an operator network but also the first localnetwork by using the eNB, so that a user equipment simultaneouslyaccesses the operator network and the local network.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, before determining, according to the accessinformation of the UE, the first local gateway corresponding to the UE,the first processing module 902 in the MME is further configured to:obtain function information of the eNB; determine, according to thefunction information of the eNB, whether the eNB supports a localgateway connection; and when determining that the eNB supports the localgateway connection, trigger the step of determining the first localgateway corresponding to the UE.

In this way, completion of a subsequent action is triggered only whenthe first processing module 902 determines that the eNB supports thelocal gateway connection, so that system resources are saved.

It may be understood that, the UE may correspond to only one localgateway, or may correspond to multiple local gateways.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, the access information includes the UE identifier.The UE identifier is used to uniquely identify the UE. When determining,according to the access information of the UE, the first local gatewaycorresponding to the UE, the first processing module 902 may bespecifically configured to search, according to the UE identifier, auser management server for the first local gateway corresponding to theUE.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, the first local gateway may be a local gatewayhaving a highest priority in multiple local gateways corresponding tothe UE.

In this embodiment, the UE corresponds to the multiple local gateways.The first processing module 902 uses, as the first local gateway, thelocal gateway having the highest priority in the multiple localgateways.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, the function information of the eNB furtherincludes information about a local gateway accessed by the eNB. Theaccess information includes the UE identifier. The UE identifier is usedto uniquely identify the UE. When determining, according to the accessinformation of the UE, the first local gateway corresponding to the UE,the first processing module 902 is specifically configured to determine,according to the information about the local gateway accessed by the eNBand the UE identifier, the first local gateway corresponding to the UE.

In actual application, a local gateway corresponding to the UE may beupdated. In another embodiment of the MME in this embodiment of thepresent application, after the first processing module 902 in the MMEestablishes, for the UE, the user plane bearer that is from the eNB tothe C-GW and that includes the first local gateway used as theintermediate node, the first processing module 902 is further configuredto: when determining that the local gateway corresponding to the UE isupdated to a third local gateway, establish, for the UE, a user planebearer that is from the eNB to the C-GW and that includes the thirdlocal gateway used as an intermediate node. The third local gateway is agateway of a third local network.

In this embodiment, the first processing module 902 can determine anupdated local gateway having a highest priority, and establish, for theUE, a user plane bearer in which the updated local gateway is used as anintermediate node, so that network system adaptability is enhanced, andperformance of interaction with the user is improved.

In actual application, there may be multiple subnets in the localnetwork, and the UE may correspond to some of the subnets. Optionally,in another embodiment of the MME in this embodiment of the presentapplication, the first processing module 902 is further configured toobtain, according to the UE identifier, a first subnet corresponding tothe UE. The first subnet is located in the first local network.

The MME further includes:

a first sending module 903, configured to send a first routinginstruction to the first local gateway, where the first routinginstruction includes an identifier of the first subnet and the UEidentifier, and the first routing instruction is used to instruct toroute, to the first subnet, data used by the UE to access the firstlocal network.

Optionally, in actual application, when obtaining, according to the UEidentifier, the first subnet corresponding to the UE, the firstprocessing module 902 may be specifically configured to: determine,according to the UE identifier, a user group corresponding to the UE;and determine, according to location information of the UE and/or acurrent time and the user group, the first subnet corresponding to theUE.

In this embodiment, the first processing module 902 can determine thesubnet corresponding to the UE in the local network. The first sendingmodule 903 sends the routing instruction to the local gateway, so thatthe local gateway routes, to the subnet, all data used by the UE toaccess the local network, so as to implement precise control on networkaccess permission.

It may be understood that alternatively, a correspondence between the UEand the subnet may directly exist, and a correspondence between the UEand the local gateway is then determined according to thecorrespondence. In another embodiment of the MME in this embodiment ofthe present application, the first processing module 902 in theforegoing embodiment may be further configured to: determine a secondsubnet corresponding to the UE, where the second subnet is a subnethaving a highest priority in multiple subnets currently corresponding tothe UE or a subnet uniquely corresponding to the UE; determine that thesecond subnet is located in the first local network; and determine thata gateway of the first local network is the first local gateway.

Optionally, in actual application, the first processing module 902 maybe specifically configured to: determine a user group corresponding tothe UE; and determine, according to location information of the UEand/or a current time and the user group that is determined by the firstprocessing module 902, the second subnet corresponding to the UE.

In this embodiment, the UE corresponds to the subnet. The firstprocessing module 902 can determine the subnet corresponding to the UE,then determine the local network in which the subnet is located, findthe local gateway of the local network, and finally determine the localgateway that needs to be used as the intermediate node for establishingthe user plane bearer.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, the first sending module 903 in the foregoingembodiment may be further configured to: send a second routinginstruction to the first local gateway. The second routing instructionincludes an identifier of the second subnet and an UE identifier, andthe routing instruction is used to instruct to route, to the secondsubnet, the data used by the UE to access the first local network.

In this embodiment of the present application, the first sending module903 sends the second routing instruction, so that the local gatewayroutes, to the second subnet that is identified by the identifier of thesecond subnet and that corresponds to the UE, the data used by the UE toaccess the first local network, so as to implement precise control onnetwork access permission.

In actual application, a subnet corresponding to the UE may also beupdated. After the update, another module may perform correspondingprocessing. In another embodiment of the MME in this embodiment of thepresent application, after the first processing module 902 establishes,for the UE, the user plane bearer that is from the eNB to the gatewayC-GW of the core network and that includes the first local gateway usedas the intermediate node, the first processing module 902 is furtherconfigured to: determine that a subnet corresponding to the UE isupdated to a third subnet; determine that the third subnet is located ina second local network, wherein the second local network is differentfrom the first local network; determine that a gateway of the secondlocal network is a second local gateway; and establish, for the UE, auser plane bearer that is from the eNB to the C-GW and that includes thesecond local gateway used as an intermediate node.

In this embodiment of the present application, the first processingmodule 902 can determine the updated subnet corresponding to the UE,determine, according to the subnet, the local gateway corresponding tothe UE, and establish, for the UE, the user plane bearer in which thelocal gateway is used as the intermediate node, so that network systemadaptability is enhanced, and performance of interaction with the useris improved.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, after the first processing module 902 determinesthat the gateway of the second local network is the second localgateway, the first sending module 903 is further configured to send athird routing instruction to the second local gateway. The third routinginstruction includes an identifier of the third subnet and the UEidentifier, and the routing instruction is used to instruct to route, tothe third subnet, data used by the UE to access the second localnetwork.

In this embodiment of the present application, the first sending module903 sends the third routing instruction, so that the local gatewayroutes, to the third subnet corresponding to the UE, the data used bythe UE to access the second local network, so as to implement precisecontrol on network access permission.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, after establishing, for the UE, the user planebearer that is from the eNB to the C-GW and that includes the localgateway used as the intermediate node, the first processing module 902is further configured to: obtain, according to the UE identifier, anetwork name of the subnet corresponding to the UE; and instruct thefirst sending module 903 to send the network name to the UE by using anon-access stratum NAS message, so that the UE displays the network nameon a user interface.

Optionally, in actual application, the first sending module 903 isfurther configured to notify the C-GW of the subnet currentlycorresponding to the UE.

The first receiving module 901 is further configured to receive a domainname system server address that is assigned to the subnet correspondingto the UE and that is returned by the C-GW. A domain name system serveridentified by the domain name system server address stores acorrespondence between a domain name and an IP address of a networkdevice in the subnet corresponding to the UE.

The first sending module 903 is further configured to send, to the UE,the domain name system server address assigned to the subnetcorresponding to the UE.

In this embodiment, the first sending module 903 sends the network nameof the subnet to the UE, so that the network name can be displayed onthe user interface of the UE, so as to help a user more intuitively knowa currently accessed subnet, and improve man-machine interactionperformance.

Optionally, in another embodiment of the MME in this embodiment of thepresent application, the first sending module 903 is further configuredto notify the C-GW of a local network currently corresponding to the UE.

The first receiving module 901 is further configured to receive a domainname system server address that is assigned to the local networkcorresponding to the UE and that is returned by the C-GW. A domain namesystem server identified by the domain name system server address storesa correspondence between a domain name and an IP address of a networkdevice in the local network corresponding to the UE.

The first sending module 903 is further configured to send, to the UE,the domain name system server address assigned to the local networkcorresponding to the UE.

Optionally, in actual application, when establishing, for the UE, theuser plane bearer that is from the eNB to the gateway C-GW of the corenetwork and that includes the first local gateway used as theintermediate node, the first processing module 902 is specificallyconfigured to: control the first receiving module 901 to obtain an IPaddress and an end point identifier of a tunnel from the local gatewayto the C-GW that are assigned by the C-GW, and control the first sendingmodule 903 to send, to the local gateway, the IP address and the endpoint identifier of the tunnel from the local gateway to the C-GW thatare assigned by the C-GW; control the first receiving module 901 toobtain an IP address and an end point identifier of a tunnel from thelocal gateway to the eNB that are assigned by the eNB, and control thefirst sending module 903 to send, to the local gateway, the IP addressand the end point identifier of the tunnel from the local gateway to theeNB that are assigned by the eNB; and control the first receiving module901 to obtain an IP address and an end point identifier of a tunnel fromthe C-GW to the local gateway that are assigned by the local gateway andan IP address and an end point identifier of a tunnel from the eNB tothe local gateway that are assigned by the local gateway, and controlthe first sending module 903 to send, to the C-GW, the IP address andthe end point identifier of the tunnel from the C-GW to the localgateway that are assigned by the local gateway, and to send, to the eNB,the IP address and the end point identifier of the tunnel from the eNBto the local gateway that are assigned by the local gateway.

2. Local gateway:

Referring to FIG. 10, an embodiment of a local gateway in an embodimentof the present application includes:

a second receiving module 1001, configured to receive a user planeestablishment request sent by a mobility management entity MME, wherethe user plane establishment request includes information about a userplane bearer that is established by a gateway C-GW of a core network forUE and that is from the local gateway to the C-GW, the UE accesses thecore network by using an eNB, and the local gateway is a local gatewaycorresponding to the UE; and

a second processing module 1002, configured to establish, for the UEaccording to the user plane establishment request, a user plane bearerthat is from the eNB to the C-GW and that includes the local gatewayused as an intermediate node.

In this embodiment, the second processing module 1002 can establish, forthe UE, the user plane bearer in which the local gateway is used as theintermediate node, so that the UE accesses an operator network and alocal network in which the local gateway is used as a gateway.

Optionally, in another embodiment of the local gateway in thisembodiment of the present application, the second processing module 1002is further configured to determine whether received data used by the UEto access a network is data used to access the local network.

The local gateway further includes:

a second sending module 1003, configured to: when it is determined thatthe data used by the UE to access a network is the data used to accessthe local network, route, to the local network, the data used by the UEto access a network; or when it is determined that the data used by theUE to access a network is not the data used to access the local network,forward, to the C-GW, the data used by the UE to access a network.

In actual application, the local gateway may obtain by itself a subnetidentifier corresponding to the UE, or may obtain a subnet identifier byreceiving a routing instruction sent by the MME. The followingspecifically describes, by using the two manners as examples, the localgateway in this embodiment of the present application.

Optionally, in another embodiment of the local gateway in thisembodiment of the present application, after the second processingmodule 1002 establishes, for the UE according to the user planeestablishment request, the user plane bearer that is from the eNB to theC-GW and that includes the local gateway used as the intermediate node,and before the second sending module 1003 routes, to the local network,the data used by the UE to access a network, the second processingmodule 1002 is further configured to determine, according to a UEidentifier, a subnet corresponding to the UE. The UE identifier is usedto uniquely identify the UE, and the user plane establishment requestincludes the UE identifier.

When routing, to the local network, the data used by the UE to access anetwork, the second sending module 1003 is specifically configured toroute, to the subnet corresponding to the UE, the data used by the UE toaccess a network.

Optionally, in another embodiment of the local gateway in thisembodiment of the present application, after the second processingmodule 1002 establishes, for the UE according to the user planeestablishment request, the user plane bearer that is from the eNB to theC-GW and that includes the local gateway used as the intermediate node,and before the second sending module 1003 routes, to the local network,the data used by the UE to access a network, the second receiving module1001 is further configured to receive a routing instruction sent by theMME. The routing instruction includes a subnet identifier and a UEidentifier, the UE identifier is used to uniquely identify the UE, andthe subnet identifier is used to uniquely identify a subnet.

When routing, to the local network, the data used by the UE to access anetwork, the second sending module 1003 is specifically configured toroute, according to the routing instruction to the subnet identified bythe subnet identifier in the routing instruction, the data used by theUE to access a network.

In this embodiment of the present application, the MME obtains thesubnet identifier corresponding to the UE, the second receiving module1001 receives the routing instruction sent by the MME, and the secondsending module 1003 routes, according to the routing instruction to thesubnet identified by the subnet identifier, the data used by the UE toaccess the local network, so as to implement fine control on networkaccess permission, and relieve data processing pressure of the localgateway.

Optionally, in another embodiment of the local gateway in thisembodiment of the present application, after the second processingmodule 1002 establishes, for the UE according to the user planeestablishment request, the user plane bearer that is from the eNB to theC-GW and that includes the local gateway used as the intermediate node,and before the second sending module 1003 routes, to the local network,the data used by the UE to access a network, the second processingmodule 1002 is further configured to determine, according to a UEidentifier, a subnet corresponding to the UE. The UE identifier is usedto uniquely identify the UE, and the user plane establishment requestincludes the UE identifier.

When routing, to the local network, the data used by the UE to access anetwork, the second sending module 1003 is specifically configured toroute, to the subnet corresponding to the UE, the data used by the UE toaccess a network.

In this embodiment, after establishing, for the UE, the user planebearer in which the local gateway is used as the intermediate node, thesecond processing module 1002 obtains the subnet corresponding to theUE, and the second sending module 1003 routes, to the subnet, the dataused by the UE to access the local network, so as to implement finecontrol on network access permission.

Optionally, in another embodiment of the local gateway in thisembodiment of the present application, when determining whether thereceived data used by the UE to access a network is the data used toaccess the local network, the second processing module 1002 isspecifically configured to: when the data used by the UE to access anetwork is received, determine, according to a destination IP address ofthe data used by the UE to access a network, whether the data used bythe UE to access a network is the data used to access the local network.The local gateway stores a list of an IP address of a network device inthe local network.

Optionally, in another embodiment of the local gateway in thisembodiment of the present application, when receiving the user planeestablishment request sent by the mobility management entity MME, thesecond receiving module 1001 is specifically configured to obtain an IPaddress and an end point identifier of a tunnel from the local gatewayto the C-GW that are assigned by the C-GW to a user plane of the UE.

When establishing, for the UE according to the user plane establishmentrequest, the user plane bearer that is from the eNB to the C-GW and thatincludes the local gateway used as the intermediate node, the secondprocessing module 1002 is specifically configured to: assign, to theuser plane of the UE, an IP address and an end point identifier of atunnel from the C-GW to the local gateway and an IP address and an endpoint identifier of a tunnel from the eNB to the local gateway; andcontrol the second sending module 1003 to send, to the MME, the IPaddress and the end point identifier of the tunnel from the C-GW to thelocal gateway that are assigned by the second processing module 1002 andthe IP address and the end point identifier of the tunnel from the eNBto the local gateway that are assigned by the second processing module1002.

3. Base station:

Referring to FIG. 11, an embodiment of a base station in an embodimentof the present application includes:

a third processing module 1101, configured to: connect UE and a corenetwork, where a gateway of the core network is a C-GW; and establish,for the UE, a user plane bearer that is from the eNB to the C-GW andthat includes a local gateway, corresponding to the UE, used as anintermediate node, where the local gateway is a gateway of a localnetwork;

a third receiving module 1102, configured to receive data used by the UEto access the local network; and

a third sending module 1103, configured to: when the data used by the UEto access the local network is received, send, to the local gateway, thedata used to access the local network.

In this embodiment, after the third processing module 1101 establishes,for the UE, the user plane bearer in which the local gateway is used asthe intermediate node, the third sending module 1103 can send, to thelocal gateway, the data that is used by the UE to access the localnetwork and that is received by the third receiving module 1102, so thatan operator network and the local network are simultaneously accessed.

In actual application, the base station may further obtain a localgateway or a subnet identifier corresponding to the UE, and send thelocal gateway or the subnet identifier to an MME. Optionally, in anotherembodiment of the base station in this embodiment of the presentapplication, before establishing, for the UE, the user plane bearer thatis from the eNB to the C-GW and that includes the local gateway,corresponding to the UE, used as the intermediate node, the thirdprocessing module 1101 is further configured to determine the localgateway or a subnet corresponding to the UE.

The third sending module 1103 is further configured to notify the MME ofthe determined local gateway or subnet corresponding to the UE.

In this embodiment, the third sending module 1103 may notify the MME ofthe local gateway or subnet corresponding to the UE that is determinedby the third processing module 1101, so as to relieve operation pressureof the MME.

Optionally, in another embodiment of the base station in this embodimentof the present application, when establishing, for the UE, the userplane bearer that is from the eNB to the C-GW and that includes thelocal gateway, corresponding to the UE, used as the intermediate node,the third processing module 1101 is specifically configured to: controlthe third receiving module 1102 to obtain an IP address and an end pointidentifier of a tunnel from the eNB to the local gateway that areassigned by the local gateway to a user plane of the UE; assign, to theuser plane of the UE, an IP address and an end point identifier of atunnel from the local gateway to the eNB; and control the third sendingmodule 1103 to send, to the MME, the IP address and the end pointidentifier of the tunnel from the local gateway to the eNB that areassigned by the third processing module 1101.

Referring to FIG. 12, FIG. 12 is a schematic structural diagram of anetwork device 1200, which may represent an MME, a local gateway, or anbase station in an embodiment of the present application. The networkdevice 1200 includes:

an input apparatus 1201, an output apparatus 1202, a processor 1203, anda memory 1204 (there may be one or more processors 1203, and oneprocessor 1203 is used as an example in FIG. 12). In some embodiments ofthe present application, the input apparatus 1201, the output apparatus1202, the processor 1203, and the memory 1204 may be connected by usinga bus or in another manner, for example, connected by using a bus inFIG. 12.

When the network device 1200 shown in FIG. 12 represents an MME, theprocessor 1203 is configured to perform the following steps by invokingan operation instruction stored in the memory 1204:

instructing the input apparatus 1201 to receive an access request ofuser equipment UE that is sent by an base station eNB, where the accessrequest carries access information of the UE;

determining, according to the access information of the UE, a firstlocal gateway corresponding to the UE, where the first local gateway isa gateway of a first local network; and

establishing, for the UE, a user plane bearer that is from the eNB to agateway C-GW of a core network and that includes the first local gatewayused as an intermediate node.

In some embodiments of the present application, before performing thestep of determining, according to the access information of the UE, afirst local gateway corresponding to the UE, the processor 1203 isfurther configured to perform the following steps:

obtaining function information of the eNB;

determining, according to the function information of the eNB, whetherthe eNB supports a local gateway connection; and

when determining that the eNB supports the local gateway connection,triggering the step of determining, according to the access informationof the UE, a first local gateway corresponding to the UE.

In some embodiments of the present application, the access informationincludes the UE identifier. The UE identifier is used to uniquelyidentify the UE. When performing the step of determining, according tothe access information of the UE, a first local gateway corresponding tothe UE, the processor 1203 specifically performs the following step:

searching, according to the UE identifier, a user management server forthe first local gateway corresponding to the UE.

In some embodiments of the present application, the first local gatewayis a local gateway having a highest priority in multiple local gatewayscorresponding to the UE.

In some embodiments of the present application, the function informationof the eNB further includes information about a local gateway accessedby the eNB. The access information includes the UE identifier. The UEidentifier is used to uniquely identify the UE. When performing the stepof determining, according to the access information of the UE, a firstlocal gateway corresponding to the UE, the processor 1203 specificallyperforms the following step:

determining, according to the information about the local gatewayaccessed by the eNB and the UE identifier, the first local gatewaycorresponding to the UE.

In some embodiments of the present application, after performing thestep of establishing, for the UE, a user plane bearer that is from theeNB to the C-GW and that includes the first local gateway used as anintermediate node, the processor 1203 is further configured to performthe following step:

when determining that a local gateway corresponding to the UE is updatedto a third local gateway, establishing, for the UE, a user plane bearerthat is from the eNB to the C-GW and that includes the third localgateway used as an intermediate node, where the third local gateway is agateway of a third local network.

In some embodiments of the present application, the processor 1203 isfurther configured to perform the following steps:

obtaining, according to the UE identifier, a first subnet correspondingto the UE, where the first subnet is located in the first local network;and

sending a first routing instruction to the first local gateway, wherethe first routing instruction includes an identifier of the first subnetand the UE identifier, and the first routing instruction is used toinstruct to route, to the first subnet, data used by the UE to accessthe first local network.

In some embodiments of the present application, when performing the stepof obtaining, according to the UE identifier, a first subnetcorresponding to the UE, the processor 1203 specifically performs thefollowing steps:

determining, according to the UE identifier, a user group correspondingto the UE; and

determining, according to location information of the UE and/or acurrent time and the user group, the first subnet corresponding to theUE.

In some embodiments of the present application, after performing thestep of establishing, for the UE, a user plane bearer that is from theeNB to a gateway C-GW of a core network and that includes the firstlocal gateway used as an intermediate node, the processor 1203 isfurther configured to perform the following steps:

determining that a subnet corresponding to the UE is updated to a thirdsubnet;

determining that the third subnet is located in a second local network,wherein the second local network is different from the first localnetwork;

determining that a gateway of the second local network is a second localgateway; and

establishing, for the UE, a user plane bearer that is from the eNB tothe C-GW and that includes the second local gateway used as anintermediate node.

In some embodiments of the present application, after performing thestep of determining that a gateway of the second local network is asecond local gateway, the processor 1203 is further configured toperform the following step:

instructing the output apparatus 1202 to send a third routinginstruction to the second local gateway, where the third routinginstruction includes an identifier of the third subnet and the UEidentifier, and the routing instruction is used to instruct to route, tothe third subnet, data used by the UE to access the second localnetwork.

In some embodiments of the present application, after performing thestep of establishing, for the UE, a user plane bearer that is from theeNB to the C-GW and that includes the local gateway used as anintermediate node, the processor 1203 is further configured to performthe following steps:

obtaining, according to the UE identifier, a network name of the subnetcorresponding to the UE; and

sending the network name to the UE by using a non-access stratum NASmessage, so that the UE displays the network name on a user interface.

In some embodiments of the present application, the processor 1203 isfurther configured to perform the following steps:

notifying the C-GW of the subnet currently corresponding to the UE;

receiving a domain name system server address that is assigned to thesubnet corresponding to the UE and that is returned by the C-GW, where adomain name system server identified by the domain name system serveraddress stores a correspondence between a domain name and an IP addressof a network device in the subnet corresponding to the UE; and

sending, to the UE, the domain name system server address assigned tothe subnet corresponding to the UE.

In some embodiments of the present application, the processor 1203 isfurther configured to perform the following steps:

notifying the C-GW of a local network currently corresponding to the UE;

receiving a domain name system server address that is assigned to thelocal network corresponding to the UE and that is returned by the C-GW,where a domain name system server identified by the domain name systemserver address stores a correspondence between a domain name and an IPaddress of a network device in the local network corresponding to theUE; and

sending, to the UE, the domain name system server address assigned tothe local network corresponding to the UE.

In some embodiments of the present application, when performing the stepof establishing, for the UE, a user plane bearer that is from the eNB toa gateway C-GW of a core network and that includes the first localgateway used as an intermediate node, the processor 1203 specificallyperforms the following steps:

instructing the input apparatus 1201 to obtain an IP address and an endpoint identifier of a tunnel from the local gateway to the C-GW that areassigned by the C-GW, and instructing the output apparatus 1202 to send,to the local gateway, the IP address and the end point identifier of thetunnel from the local gateway to the C-GW that are assigned by the C-GW;

instructing the input apparatus 1201 to obtain an IP address and an endpoint identifier of a tunnel from the local gateway to the eNB that areassigned by the eNB, and instructing the output apparatus 1202 to send,to the local gateway, the IP address and the end point identifier of thetunnel from the local gateway to the eNB that are assigned by the eNB;and

instructing the input apparatus 1201 to obtain an IP address and an endpoint identifier of a tunnel from the C-GW to the local gateway that areassigned by the local gateway and an IP address and an end pointidentifier of a tunnel from the eNB to the local gateway that areassigned by the local gateway, and instructing the output apparatus 1202to send, to the C-GW, the IP address and the end point identifier of thetunnel from the C-GW to the local gateway that are assigned by the localgateway, and to send, to the eNB, the IP address and the end pointidentifier of the tunnel from the eNB to the local gateway that areassigned by the local gateway.

When the network device 1200 shown in FIG. 12 represents a localgateway, the processor 1203 is configured to perform the following stepsby invoking an operation instruction stored in the memory 1204:

instructing the input apparatus 1201 to receive a user planeestablishment request sent by a mobility management entity MME, wherethe user plane establishment request includes information about a userplane bearer that is established by a gateway C-GW of a core network forUE and that is from the local gateway to the C-GW, the UE accesses thecore network by using an eNB, and the local gateway is a local gatewaycorresponding to the UE; and

establishing, for the UE according to the user plane establishmentrequest, a user plane bearer that is from the eNB to the C-GW and thatincludes the local gateway used as an intermediate node.

In some embodiments of the present application, the processor 1203 isfurther configured to perform the following steps:

determining whether received data used by the UE to access a network isdata used to access the local network; and

when determining that the data used by the UE to access a network is thedata used to access the local network, instructing the output apparatus1202 to route, to the local network, the data used by the UE to access anetwork; or when determining that the data used by the UE to access anetwork is not the data used to access the local network, instructingthe output apparatus 1202 to forward, to the C-GW, the data used by theUE to access a network.

In some embodiments of the present application, after performing thestep of establishing, for the UE according to the user planeestablishment request, a user plane bearer that is from the eNB to theC-GW and that includes the local gateway used as an intermediate node,and before performing the step of routing, to the local network, thedata used by the UE to access a network, the processor 1203 is furtherconfigured to perform the following step:

determining, according to a UE identifier, a subnet corresponding to theUE, where the UE identifier is used to uniquely identify the UE, and theuser plane establishment request includes the UE identifier.

When performing the step of routing, to the local network, the data usedby the UE to access a network, the processor 1203 specifically performsthe following step:

routing, to the subnet corresponding to the UE, the data used by the UEto access a network.

In some embodiments of the present application, after performing thestep of establishing, for the UE according to the user planeestablishment request, a user plane bearer that is from the eNB to theC-GW and that includes the local gateway used as an intermediate node,and before performing the step of routing, to the local network, thedata used by the UE to access a network, the processor 1203 is furtherconfigured to perform the following step:

instructing the input apparatus 1201 to receive a routing instructionsent by the MME, where the routing instruction includes a subnetidentifier and a UE identifier, the UE identifier is used to uniquelyidentify the UE, and the subnet identifier is used to uniquely identifya subnet.

When performing the step of routing, to the local network, the data usedby the UE to access a network, the processor 1203 specifically performsthe following step:

routing, according to the routing instruction to the subnet identifiedby the subnet identifier in the routing instruction, the data used bythe UE to access a network.

In some embodiments of the present application, when performing the stepof determining whether received data used by the UE to access a networkis data used to access the local network, the processor 1203specifically performs the following step:

when the data used by the UE to access a network is received,determining, according to a destination IP address of the data used bythe UE to access a network, whether the data used by the UE to access anetwork is the data used to access the local network, where the memory1204 stores a list of an IP address of a network device in the localnetwork.

In some embodiments of the present application, when performing the stepof instructing the input apparatus 1201 to receive a user planeestablishment request sent by a mobility management entity MME, theprocessor 1203 specifically performs the following step:

instructing the input apparatus 1201 to obtain an IP address and an endpoint identifier of a tunnel from the local gateway to the C-GW that areassigned by the C-GW to a user plane of the UE.

When performing the step of establishing, for the UE according to theuser plane establishment request, a user plane bearer that is from theeNB to the C-GW and that includes the local gateway used as anintermediate node, the processor 1203 specifically performs thefollowing steps:

assigning, to the user plane of the UE, an IP address and an end pointidentifier of a tunnel from the C-GW to the local gateway and an IPaddress and an end point identifier of a tunnel from the eNB to thelocal gateway; and

instructing the output apparatus 1202 to send, to the MME, the assignedIP address and end point identifier of the tunnel from the C-GW to thelocal gateway and the assigned IP address and end point identifier ofthe tunnel from the eNB to the local gateway.

When the network device 1200 shown in FIG. 12 represents an eNB, theprocessor 1203 is configured to perform the following steps by invokingan operation instruction stored in the memory 1204:

connecting UE and a core network, where a gateway of the core network isa C-GW;

establishing, for the UE, a user plane bearer that is from the eNB tothe C-GW and that includes a local gateway, corresponding to the UE,used as an intermediate node, where the local gateway is a gateway of alocal network; and

when the input apparatus 1201 receives data used by the UE to access thelocal network, instructing the output apparatus 1202 to send, to thelocal gateway, the data used to access the local network.

In some embodiments of the present application, before the processor1203 performs the step of establishing, for the UE, a user plane bearerthat is from the eNB to the C-GW and that includes a local gateway,corresponding to the UE, used as an intermediate node, the processor1203 is further configured to perform the following steps:

determining the local gateway or a subnet corresponding to the UE; and

instructing the output apparatus 1202 to notify an MME of the determinedlocal gateway or subnet corresponding to the UE.

In some embodiments of the present application, when performing the stepof establishing, for the UE, a user plane bearer that is from the eNB tothe C-GW and that includes a local gateway, corresponding to the UE,used as an intermediate node, the processor 1203 specifically performsthe following steps:

instructing the input apparatus 1201 to obtain an IP address and an endpoint identifier of a tunnel from the eNB to the local gateway that areassigned by the local gateway to a user plane of the UE;

assigning, to the user plane of the UE, an IP address and an end pointidentifier of a tunnel from the local gateway to the eNB; and

instructing the output apparatus 1202 to send, to the MME, the assignedIP address and end point identifier of the tunnel from the local gatewayto the eNB.

The following describes a system for accessing a local network in anembodiment of the present application. Referring to FIG. 13, a systemfor accessing a local network in an embodiment of the presentapplication includes:

an MME 1301 shown in any one of the embodiments corresponding to FIG. 9or FIG. 12, a local gateway 1302 shown in any one of the embodimentscorresponding to FIG. 10 or FIG. 12, a base station 1303 shown in anyone of the embodiments corresponding to FIG. 11 or FIG. 12, and UE 1304.

Optionally, in another embodiment, the system may further include:

a user management server 1305, configured to store a correspondencebetween the UE and a subnet and/or a local gateway; and

a domain name system server 1306, configured to: store a correspondencebetween a domain name and an IP address of a network device in a subnetcorresponding to the UE, and covert a domain name of a service server inthe subnet corresponding to the UE to an IP address of the serviceserver.

Optionally, in actual application, the system may further include:

an open platform 1307, configured to configure the user managementserver 1305 and the domain name system server 1306, or the local gateway1302.

It may be clearly understood by persons skilled in the art that, for thepurpose of convenient and brief description, for a detailed workingprocess of the foregoing system, apparatus, and unit, refer to acorresponding process in the foregoing method embodiments, and detailsare not described herein again.

In the several embodiments provided in this application, it should beunderstood that the disclosed system, apparatus, and method may beimplemented in other manners. For example, the described apparatusembodiment is merely an example. For example, the unit division ismerely logical function division and may be other division in actualimplementation. For example, a plurality of units or components may becombined or integrated into another system, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented by using some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electronic, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected according toactual requirements to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of the presentapplication may be integrated into one processing unit, or each of theunits may exist alone physically, or two or more units are integratedinto one unit. The integrated unit may be implemented in a form ofhardware, or may be implemented in a form of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a computer-readable storage medium.Based on such an understanding, the technical solutions of the presentapplication essentially, or the part contributing to the prior art, orall or some of the technical solutions may be implemented in a form of asoftware product. The computer software product is stored in a storagemedium and includes several instructions for instructing a computerdevice (which may be a personal computer, a server, a network device, orthe like) to perform all or some of the steps of the methods describedin the embodiments of the present application. The foregoing storagemedium includes any medium that can store program code, such as a USBflash drive, a removable hard disk, a read-only memory (ROM), a randomaccess memory (RAM), a magnetic disk, or an optical disc.

The foregoing embodiments are merely intended for describing thetechnical solutions of the present application, but not for limiting thepresent application. Although the present application is described indetail with reference to the foregoing embodiments, persons of ordinaryskill in the art should understand that they may still makemodifications to the technical solutions described in the foregoingembodiments or make equivalent replacements to some technical featuresthereof, without departing from the spirit and scope of the technicalsolutions of the embodiments of the present application.

What is claimed is:
 1. A method for accessing a local network, themethod comprising: establishing, by a management entity, for a userequipment (UE), a data channel that is between a base station accessedby the UE and a gateway of a core network and that comprises a localgateway of a local network as an intermediate node, wherein theestablishing the data channel comprises: sending tunnel information ofthe gateway of the core network to the local gateway, and sending tunnelinformation of the base station to the local gateway; and sending firsttunnel information of the local gateway to the gateway of the corenetwork, and sending second tunnel information of the local gateway tothe base station, and wherein the method further comprises: receiving,by the local gateway, data of the UE from the base station; and inresponse to determining that the received data is used to access thelocal network, routing, by the local gateway, the data to the localnetwork.
 2. The method according to claim 1, further comprising: inresponse to determining that the data is used to access the corenetwork, forwarding, by the local gateway, the data to the gateway ofthe core network.
 3. The method according to claim 1, wherein the localgateway stores a list of IP addresses of network devices in the localnetwork.
 4. The method according to claim 1, wherein: the tunnelinformation of the gateway of the core network is for a tunnel from thelocal gateway to the gateway of the core network; the tunnel informationof the base station is for a tunnel from the local gateway to the basestation; the first tunnel information of the local gateway is for atunnel from the gateway of the core network to the local gateway; andthe second tunnel information of the local gateway is for a tunnel fromthe base station to the local gateway.
 5. The method according to claim1, wherein the tunnel information comprises: an IP address and an endpoint identifier of a tunnel.
 6. The method according to claim 4,further comprising: assigning, by the gateway of the core network, thetunnel information of the gateway of the core network for the tunnelfrom the local gateway to the gateway of the core network; assigning, bythe base station, the tunnel information of the base station for thetunnel from the local gateway to the base station; assigning, by thelocal gateway, the first tunnel information of the local gateway for thetunnel from the gateway of the core network to the local gateway; andassigning, by the local gateway, the second tunnel information of thelocal gateway for the tunnel from the base station to the local gateway.7. The method according to claim 1, wherein in determining that thereceived data is used to access the local network comprises: determiningthat the received data is used to access the local network according todestination IP information of the data.
 8. The method according to claim7, wherein the destination IP information comprises: destination IPaddress.
 9. A system, comprising, a management entity and a localgateway of a local network, wherein: the management entity is configuredto establish for a user equipment (UE), a data channel that is between abase station accessed by the UE and a gateway of a core network and thatcomprises the local gateway of the local network as an intermediatenode, wherein to establish the data channel, the management entity isconfigured to: send tunnel information of the gateway of the corenetwork to the local gateway, send tunnel information of the basestation to the local gateway, send first tunnel information of the localgateway to the gateway of the core network, and send second tunnelinformation of the local gateway to the base station; and the localgateway is configured to receive data of UE from the base station, androute the data to the local network in response to determining thereceived data from the base station is used to access the local network.10. The system according to claim 9, wherein the local gateway isconfigured to: forward the data to the gateway of the core network inresponse to determining the data is used to access the core network. 11.The system according to claim 9, wherein the local gateway is configuredto store a list of IP addresses of network devices in the local network.12. The system according to claim 9, wherein: the tunnel information ofthe gateway of the core network is for a tunnel from the local gatewayto the gateway of the core network; the tunnel information of the basestation is for a tunnel from the local gateway to the base station; thefirst tunnel information of the local gateway is for a tunnel from thegateway of the core network to the local gateway; and the second tunnelinformation of the local gateway is for a tunnel from the base stationto the local gateway.
 13. The system according to claim 9, wherein thetunnel information comprises: an IP address and an end point identifierof a tunnel.
 14. The system according to claim 12, wherein the systemfurther comprises the gateway of the core network and the base station,and wherein: the gateway of the core network is configured to assign thetunnel information of the gateway of the core network for the tunnelfrom the local gateway to the gateway of the core network; the basestation is configured to assign the tunnel information of the basestation for the tunnel from the local gateway to the base station; thelocal gateway is configured to assign the first tunnel information ofthe local gateway for the tunnel from the gateway of the core network tothe local gateway; and the local gateway is configured to assign thesecond tunnel information of the local gateway for the tunnel from thebase station to the local gateway.
 15. The system according to claim 9,wherein in determining that the received data is used to access thelocal network, the local gateway is configured to determine that thereceived data is used to access the local network according todestination IP information of the data.
 16. The system according toclaim 15, wherein the destination IP information comprises: destinationIP address.
 17. A local gateway of a local network, comprising: a memorystoring instructions; and one or more processors in communication withthe memory, wherein the one or more processors execute the instructionsto: exchange messages with a management entity to establish for a userequipment (UE), a data channel that is between a base station accessedby the UE and a gateway of a core network and that comprises the localgateway of the local network as an intermediate node, wherein in theexchanging messages, the one or more processors execute the instructionsto: receive tunnel information of the gateway of the core network fromthe management entity, and receive tunnel information of the basestation from the management entity; receive data of the UE from the basestation; and route the data to the local network in response todetermining the received data is used to access the local network. 18.The local gateway according to claim 17, wherein the one or moreprocessors execute the instructions to: forward the data to the gatewayof the core network in response to determining the data is used toaccess the core network.
 19. The local gateway according to claim 17,wherein the local gateway stores a list of IP addresses of networkdevices in the local network.
 20. Anon-transitory computer readablemedium, comprising computer program code, which, when executed by aprocessor, causes the processor to: exchange messages with a managemententity to establish for a user equipment (UE), a data channel that isbetween a base station accessed by the UE and a gateway of a corenetwork and that comprises a local gateway of a local network as anintermediate node, wherein in the exchanging messages, the one or moreprocessors execute the instructions to: receive tunnel information ofthe gateway of the core network from the management entity, and receivetunnel information of the base station from the management entity;receive data of the UE from the base station; and route the data to thelocal network in response to determining the received data is used toaccess the local network.